Posted by Jerry Stuckle on 01/09/07 19:23
Daz wrote:
> Hi everyone.
>
> I am a little stumped at why when I try to include a file in same
> directory as the script being processed, it looks in the same directory
> as the script that included it to begin with. Is there any way I can
> get around this? Is there anyway to get the name and/or of the script
> being processed, rather than the name and/or path of the script that
> was first called?
>
> Many thanks.
>
> Daz.
>
Or, just always use the absolute path:
include $_SERVER['DOCUMENT_ROOT'] . '/path/filename.ext';
$_SERVER['DOCUMENT_ROOT'] will always reference the root directory of
your web server.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|