Do you mean you cannot access the filesystem on your own server?

You can find out if /something is a directory by connecting to the web server and request the file/directory without a trailing slash. If it is a directory server will respond with "301 Moved Permanently" response.

$is_dir=false;
$sock=fsockopen('server', 80);
fputs($sock,"GET /something\r\n\r\n");
while (!feof($fp)) {
    if(strpos(fgets($fp,128),"301 Moved Permanently")) $is_dir=true;
}
fclose ($fp);


Joe wrote:


HTTP
my department disable the function of listing file
"Marek Kilimajer" <[EMAIL PROTECTED]>
???????:[EMAIL PROTECTED]
What is remote in your circumstances? FTP, HTTP, ... ?

Joe wrote:


any alternative method is also welcome

"Joe" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó·s»D
:[EMAIL PROTECTED]


I have written a php to show file in directories.
The problem is due to is_dir() can't opearate on remote files. What should

I



do in order to fix it.
thx a lot~~~












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



Reply via email to