# SplFileObject with include_path

- Thread: https://externals.io/message/37617
- Original archive: https://news-web.php.net/php.internals/37617
- Started by Ionut Gabriel Stan on 2008-05-13T10:37:45+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #37617 — Ionut Gabriel Stan — 2008-05-13T10:37:45+00:00

URL: https://externals.io/message/37617#37617

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.

---

## #37624 — Marcus Boerger — 2008-05-13T13:57:12+00:00

URL: https://externals.io/message/37617#37624 · In reply to: #37617

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
