Dynamic include path setting?

Dynamic include path setting?

am 17.11.2007 19:05:30 von Hayden Livingston

Hello,

I was wondering if this is possible? It seems in the apache mailing
list, that it is not possible per se, but any workaround thoughts?


php_value include_path .:/libraries/$1/php/lib
SetEnv PERL5LIB /libaries/$1/perl/lib


Thanks,
HL

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Dynamic include path setting?

am 19.11.2007 00:27:13 von dmagick

Hayden Livingston wrote:
> Hello,
>
> I was wondering if this is possible? It seems in the apache mailing
> list, that it is not possible per se, but any workaround thoughts?

If they say it's not possible I don't think you're going to get a
different answer here.

>
> php_value include_path .:/libraries/$1/php/lib
> SetEnv PERL5LIB /libaries/$1/perl/lib
>


in your init.php or common.php or whatever:

// include the existing 'include_path' and then add this folder on to
the end.
ini_set('include_path', ini_get('include_path') .
':/path/to/your/base/folder');


To get your current dir:

$my_directory = dirname(__FILE__);

and adjust that.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php