-
using leading slash with php on apache2 vhost
What do I have to do to make
require_once("/includes/some.inc.php")
point to my virtual host root instead of the server root?
My virt. host root is /srv/www/vhosts/scc/
I have many layers of directories inside of each virtual host that all pull from a central includes folder, and I need a simple way to just use "/includes/blah" from anywhere.
Thanks
"I hate when people put quotes in their signatures" -anonymous
-
Hi,
maybe a
<Directory /include>
or a
php_value include_path
could help
Musicman
-
Indeed musicman.
To save going into .htaccess, a simple
ini_set('include_path', './path/');
Will do it. This function will work on all 4.x versions, whereas the include_path() function (or whatever it is called) will only work from 4.3.x.
Hope this helps you.
-
I think my uncertainty about what I was doing made it difficult for me to ask the right question.
I changed the include_path setting in php.ini to point to my includes dir and it is working ok.
I thought there was a way to get apache to treat each vhost as it's own server and the leading / would only change to the root of the vhost, not all the way to the "real server" root.
"I hate when people put quotes in their signatures" -anonymous
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|