Re: PHP includes without access to the default directory
| From: | Gundamn | Date: | Fri, 06 Dec 2002 21:15:38 +0000 |
| Subject: | Re: PHP includes without access to the default directory | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127333@lists.php.net to get a copy of this message | ||
"Tom Rogers" <trogers@kwikin.com> wrote in message
news:13587353587.20021206163625@kwikin.com...
> Hi,
>
> Friday, December 6, 2002, 11:06:36 AM, you wrote:
> G> I have a hosted account. As such, I am unable to use the default
location
> G> for files when used with the include command. So could somebody tell me
how
> G> I can either make it go to a different directory, or to link to
something
> G> (and how to add the variable as the filename)?
>
> G> Thank you in advance.
>
> If you still need access to the default include directory put this at the
top of
> each page:
>
> ini_set
("include_path","/path/to/local/includes:"ini_get("include_path"));
>
> Then no matter what directory you are in you can just include("filename");
>
> --
> regards,
> Tom
>
Thank you. This should work, but I have one question about the format of
that. this way I can make sure I do things right (getting a parse error
right now)
what did you mean by "include_path"?
/path/to/local/includes is just the path to the default includes folder?
and is include_path just the path to the includes folder that I use. And
with this, do I use the URL, or the file path (what I get whenever I get
errors)
and thank you again