I have encountered a problem with file_exists when running PHP 5.2 in client mode under Debian Etch, which is best illustrated by the following code:
Now the output from this is as follows:PHP Code:
$remote_dir = "ftps://username:email@example.com:21/";
$list = scandir($remote_dir);
foreach ($list as $entry)
echo $remote_dir.$entry.(file_exists($remote_dir.$entry) ? " exists": " not found")."\n";
¿Que?Code:ftps://usename:firstname.lastname@example.org:21/file1.php not found ftps://usename:email@example.com:21/file2.php not found ftps://usename:firstname.lastname@example.org:21/file3.php not found ... etc
EDIT: I've found that scandir, is_dir and unlink work, however file_exists, is_file, is_readable and stat don't work. Weird.