Re: SplFileObject with include_path

From: Date: Tue, 13 May 2008 13:57:12 +0000
Subject: Re: SplFileObject with include_path
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-37624@lists.php.net to get a copy of this message
Hello Ionut, file as bug please. marcus Tuesday, May 13, 2008, 12:37:45 PM, you wrote: > Hi, > I'm working on a SOAP project and as part of the > checks I make are the existence and readability of the > WSDL file. > As far as I saw, SoapClient doesn't check include_path > for the WSDL file, so I thought I could use fopen to > check this and then find the real path which would be > finally passed to the SoapClient constructor. The > problem with fopen is that I don't know how to find > the real path if the file does exist in the > include_path. So I took a look at SplFileObject, whose > constructor accepts the same parameters as fopen. > Here's my issue. If I instantiate SplFileObject like: > $file = new SplFileObject($filename, 'r', true); > and $filename is found somewhere on the include_path, > wouldn't be useful if a call to > SplFileObject::getRealPath() would return the actual > real path and not false? Because at this point it doesn't. > Best regards, Marcus

« previous php.internals (#37624) next »