mlse
03-07-2008, 02:22 PM
Hi all,
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:
$remote_dir = "ftps://username:password@127.0.0.1:21/";
$list = scandir($remote_dir);
foreach ($list as $entry)
echo $remote_dir.$entry.(file_exists($remote_dir.$entry) ? " exists": " not found")."\n";
Now the output from this is as follows:
ftps://usename:password@127.0.0.1:21/file1.php not found
ftps://usename:password@127.0.0.1:21/file2.php not found
ftps://usename:password@127.0.0.1:21/file3.php not found
... etc
¿Que? :confused:
EDIT: I've found that scandir, is_dir and unlink work, however file_exists, is_file, is_readable and stat don't work. Weird.
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:
$remote_dir = "ftps://username:password@127.0.0.1:21/";
$list = scandir($remote_dir);
foreach ($list as $entry)
echo $remote_dir.$entry.(file_exists($remote_dir.$entry) ? " exists": " not found")."\n";
Now the output from this is as follows:
ftps://usename:password@127.0.0.1:21/file1.php not found
ftps://usename:password@127.0.0.1:21/file2.php not found
ftps://usename:password@127.0.0.1:21/file3.php not found
... etc
¿Que? :confused:
EDIT: I've found that scandir, is_dir and unlink work, however file_exists, is_file, is_readable and stat don't work. Weird.