Re: PHP include_path
| From: | Richard Lynch | Date: | Sun, 30 Jun 2002 22:03:09 +0000 |
| Subject: | Re: PHP include_path | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104761@lists.php.net to get a copy of this message | ||
In article <20020627132329.96221.qmail@pb1.pair.com> , tnields@iitri.org
(Tim Nields) wrote:
>I am running php4.2.1. I tried to use a simple include() coommand, but the
>path that it defaults to is /usr/local/lib/php. Can anyone tell me how to
>change this?
You might (or might not) be able to edit "php.ini" and alter the
include_path there.
If your ISP doesn't give you your own php.ini file, (most don't) then you
*probably* have permission to use an .htaccess file to do that:
Create a file named ".htaccess" (yes, the '.' at the beginning is for real)
and put a line like this in it:
php_value include_path
"./:/path/to/your/home/directory/:/any/other/directory/you/like"
Note that this syntax is subtly different (php_value) from the php.ini
syntax.
If you have your own server, and edit php.ini, make sure that:
A) You are editing the same php.ini that <?php phpinfo();?> says it is
using.
B) You stop/start Apache so the new php.ini is re-loaded.
--
Like Music? http://l-i-e.com/artists.htm