Is there a way to check if a a folder exists on the server using PHP Ftp functionality?
From stackoverflow
-
There is no 'exists' function for ftp connections in php.
You could try ftp_chdir and check the result
-
For PHP 5:
is_dir('ftp://user:password@example.com/some/dir/path');http://uk.php.net/manual/en/function.is-dir.php : "As of PHP 5.0.0, this function can also be used with some URL wrappers."
http://uk.php.net/manual/en/wrappers.ftp.php : [Support] "As of PHP 5.0.0: filesize(), filetype(), file_exists(), is_file(), and is_dir()"
0 comments:
Post a Comment