You may need to set your include_path to "." in php.ini. Than again maybe
not. Try it. Then include "../file.inc" should work (on Unix or Linux, use
"\" on Windows).

Regards,
Jakob Kruse

""Matthew Ralston"" <[EMAIL PROTECTED]> wrote in message
9dgfbo$kom$[EMAIL PROTECTED]">news:9dgfbo$kom$[EMAIL PROTECTED]...
> How do you include or require a file that is above the current script in
the
> directory hierarchy? For example how would I include or require a file
whose
> path is "../file.inc" relative to the current script? I tried all of:
>
> include("../file.inc");
> require("../file.inc");
> include("/file.inc");
> require("/file.inc");
> include("..\file.inc");
> require("..\file.inc");
> include("\file.inc");
> require("\file.inc");
>
> but it doen't like any of them. :(
> I don't want to use a full path relative to the root of the drive or
> webserver folder because the included file and the script may move as the
> development server is setup differently to the real web server.
>
> Any ideas?
>
> --
> Thanks,
>
> Matt
> [EMAIL PROTECTED]
> < www.mralston.co.uk />
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to