views:

41

answers:

1

I have a lot of sites - all hosted on my server. I want one of them to access file from /vhost which is a directory above httpdocs where the domain is linked.

I know that there is an option to change the path in httpd.conf but that is a lot of work to change all the includes in my sites.

+1  A: 

Use the function ini_set(). For example if you wanted to set your PHP include_path to ".:../:./include:../include" then you would do this in your PHP code:

ini_set("include_path", ".:../:./include:../include");

You can also use ini_set() to affect other PHP settings like auto_prepend_file, auto_append_file, error_reporting, etc.

Pentium10