Re: Modify php.ini setting in code
| From: | Paul Burney | Date: | Wed, 28 May 2003 01:59:26 +0000 |
| Subject: | Re: Modify php.ini setting in code | ||
| References: | 1 | Groups: | php.db php.db |
| Request: | Send a blank email to php-db+get-28105@lists.php.net to get a copy of this message | ||
on 05/27/2003 8:13 PM, Harlan Lax at hlax@optonline.net appended the
following bits to my mbox:
> I am using a ISP that provides php and mysql but doesn't allow me to edit
> the php.ini. I cannot change the include path to point to a directory I
> have access to. Is there a way to set ini setting in a script ?
See the ini_set function:
<http://us2.php.net/manual/en/function.ini-set.php>
Something like: ini_set('include_path', '/whatever/path/you/need/here:.');
One problem with relative paths is that if you want to include a file at
several levels in the hierarchy, each include call needs to be different.
If your web host allows you to use .htaccess files and gives you override
permissions, you can put this in the .htaccess file at the top level of your
server.
php_value include_path '/whatever/path/you/need/here:.'
Sincerely,
Paul Burney
--
I'm inhaling Caesar's last gasp...
http://paul.burney.ws/thoughts/caesars_breath.html