Re: set_include_path() isn't persistent
| From: | Skippy | Date: | Mon, 08 Nov 2004 16:20:40 +0000 |
| Subject: | Re: set_include_path() isn't persistent | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201543@lists.php.net to get a copy of this message | ||
On Tue, 9 Nov 2004 01:39:03 +1100 Justin French
<justin.french@indent.com.au> wrote:
>
> On 09/11/2004, at 1:26 AM, John Nichel wrote:
>
> > Justin French wrote:
> >> Hi,
> >> Experimenting with set_include_path(), but it would appear that it
> >> doesn't persist for the duration of the request, just the current
> >> script. That is to say, an included file will not inherit the
> >> include_path() of the parent file.
> >> Is there any way to persist this without re-setting it on each file?
> >> Justin
> >
> > .htaccess or in the httpd.conf
>
> Figured as much... the catch is that I'd rather not have to explicitly
> set the path in htaccess (eg "/usr/home/foo/public/bah/"), but can't
> find a way yet to set a relative path in htaccess (eg "../" for "one
> level up from this htaccess file).
>
> Any ideas?
Did you try ini_set('include_path','path')? I recall doing this recently in
a root script and then include() -ing other scripts. It worked out well.
--
Skippy - Romanian Web Developers - http://ROWD.ORG