0

I'm told that this code worked until recently. I don't know when. I've boiled it down to the core problem:

$dir = "user:password@ftp.example.com/sub/sub";  // not really :-)
$resource = opendir($dir) or die("---bad directory---\n");
echo "<PRE>\$resource: ".print_r($resource,true)."</pre>\n";
$f = readdir($resource);
echo "<pre> dump:"; var_dump( $f ); echo"</pre>\n";

Anyway, if I put the value of $dir into a webbrowser, I'm immediately given a list of files. So that is valid. var_dump on the $resource gives Resource id #6 while the $f is bool(false)

Like I said, this is the core- once fixed, I will reintroduce the while loop and the rest of the code. The server has been updated to 5.3.27, but I can't find anything along these lines that will cause this to fail. I'm running 5.3.10 on my environment, and it fails here too. Any thoughts as to why this won't work any more?

btw. allow_url_fopen is true.

Thanks, Dave

4

0 回答 0