RE: [PEAR-DEV] dirname(__FILE__)

From: Date: Wed, 16 Oct 2002 22:39:46 +0000
Subject: RE: [PEAR-DEV] dirname(__FILE__)
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-10092@lists.php.net to get a copy of this message
I don't have access to php.ini on some of the servers I use but have found that if I install pear in 'includes' off my home directory and use the following at the top of any of my scripts that use PEAR it works OK; $incPath = ini_get('include_path'); ini_set('include_path',$incPath.':/home/abraund/includes:/home/abraund/includes/p ear'); The servers I use allow me to change include_path. I don't know if most hosting companies disable this but the two I use don't so it works for me. Regards Andrew Braund > On Wed Oct 16, 2002 at 07:3322PM +0200, Stig S. Bakken wrote: > > Right now, dirname(__FILE__) seems to be the only solution that works. > > Does it solve all the problems of people trapped in PHP environment > > where they can't change php.ini? > > I'm actually a bit afraid about the performance impact it might have > to have dirname(__FILE__) calls all around the place. The probably > best solution would be to have a new built-in constant (like > __BASEDIR__), but this would force every PEAR user to update to the > version of PHP that has introduced this feature ... > > -- > - Martin Martin Jansen > http://martinjansen.com/

« previous php.pear.dev (#10092) next »