Re: change PHP include directory
| From: | John W. Holmes | Date: | Sun, 14 Sep 2003 05:35:29 +0000 |
| Subject: | Re: change PHP include directory | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-162546@lists.php.net to get a copy of this message | ||
Tim Thorburn wrote:
Normally to change a sites include directory for PHP I'd use a .htaccess file and the following command: php_value include_path ".:/path/to/web/" Again normally, I would get the path to the site by doing a simple phpinfo(); command and find the _ENV["DOCUMENT_ROOT"] line near the end of the phpinfo(); page. I've just setup an account with a shared hosting provider - I'm not fully sure if they allow me to use .htaccess or not, I've got a call into tech support but waiting is boring. So while I wait - is there a better or more accurate way of determining the actual path to my site on their server? I'm sure it has been written into PHP to specifically not allow this - just curious.You will be able to get it the same way. Just look at a phpinfo() page or print the value of $_SERVER['DOCUMENT_ROOT'].
Secondly, if it is proven that my host does not allow .htaccess - is there another way for me to change the include directory from its default and into my sites root?You can use ini_set(). -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com