Hi James,
Just come up with this and it seems to work:
<?php
$root = explode("/", $_SERVER['DOCUMENT_ROOT']);
$last = array_pop($root);
$file = implode("/", $root);
include $file."/test.php";
?>
----- Original Message -----
From: "James Keeline"
> An include() or require() or file() function makes use of the filesystem
> references. Hence, a /test.php would go to the very top of the filesystem and
> attempt (and fail) to find the file.
>
> What I normally do is find the location of the current path with
> $_SERVER['DOCUMENT_ROOT'] to see the place in the filesystem where the web
> space begins. You can use $_SERVER['PHP_SELF'] to get the current page
> running
> and extract the path with a function.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/