Re: PEAR Coding Standards

From: Date: Tue, 04 May 2004 11:25:13 +0000
Subject: Re: PEAR Coding Standards
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-28762@lists.php.net to get a copy of this message
On Tue, May 04, 2004 at 01:34:32PM +1000, Aidan Lister wrote: > > However, if you're relying on the include_path (as all PEAR packages > > do), then this won't work. file_exists only checks in the current > > working directory. You'd have to check everything in the include_path > > and that's something that include is already doing. Better to just use @ > > and check the return value. > > > > > http://ircphp.com/users/imho/?file=function.file_exists_incpath.php // Loop through each path in the include path foreach (explode(';', get_include_path()) as $path) { I'm too lazy to check on windows but at least on my linux system get_include_path() returns a colon separated list. So I guess you actually need to check which operating system that is used and use semicolon for windows and colon for unix. Joakim -- Joakim Andersson ; ja@morrdusk.net ; http://morrdusk.net

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