Re: [PHP-DB] Modify php.ini setting in code

2003-05-27 Thread Paul Burney
on 05/27/2003 8:13 PM, Harlan Lax at [EMAIL PROTECTED] 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:



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


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Modify php.ini setting in code

2003-05-27 Thread George Patterson
On Tue, 27 May 2003 20:13:52 -0400
"Harlan Lax" <[EMAIL PROTECTED]> wrote:

> 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 ?
> 

Harlan, 

A better solution is to use to relative paths.. :-)

eg 

include("incl/config.php");
where incl is the directory that contains the file that you wish to utilise.


Regards


George Patterson

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Modify php.ini setting in code

2003-05-27 Thread Harlan Lax
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 ?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php