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("http://www.host.com/directory/php";);

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
http://www.host.com/directory/, if it was a directory with an index the base
would be http://www.host.com/directory/php.

Anyone know if this information is available?

Thanks,
Erik Fears.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to