SplFileObject with include_path

From: Date: Tue, 13 May 2008 10:37:45 +0000
Subject: SplFileObject with include_path
Groups: php.internals 
Request: Send a blank email to internals+get-37617@lists.php.net to get a copy of this message
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.

« previous php.internals (#37617) next »