Re: include
| From: | (Chris Adams) | Date: | Sat, 21 Apr 2001 00:13:12 +0000 |
| Subject: | Re: include | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-6942@lists.php.net to get a copy of this message | ||
On 20 Apr 2001 14:04:00 -0700, Olivier Botineau <obotineau@noos.fr> wrote:
>Good evening all,
>do you know if its possible to give an absolute path instead of a relative path for include:
>include( '../../menu.php' ); is OK
>incude( '/inculde/menu.php' ); is Not OK
That's the correct syntax for an absolute path but it's relative to the webroot
- you'll need to add in the full path - e.g. "/www/site/include/menu.php" or
"C:/IIS/site/include/menu.php".
I generally prefer to set include_path for each virtual host so I can place
included files outside of the webroot and not have to worry about paths.