Is there a way, when requesting remote files (using fopen() or file()) to
determine the base directory of the file retrieved? For instance, if I did:

$file = file("";);

Several things can happen. One is that theres an actual file named php that
is retrieved. Secondly, php could be a directory and the file index.html is
retrieved from that directory. Or php could be a directory without an index,
in which case a directory listing is generated or something to that effect.

But what I want to be able to do is to determine what the base directory is
in any case. For instance if php was a file, the base would be, if it was a directory with an index the base
would be

Anyone know if this information is available?

Erik Fears.

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to