有没有办法使用 PHP Ftp 功能检查服务器上是否存在文件夹?
最佳答案
对于 PHP 5:
$folder_exists = is_dir('ftp://user:password@example.com/some/dir/path');
http://php.net/manual/en/function.is-dir.php : "从 PHP 5.0.0 开始,这个函数也可以与一些 URL 包装器一起使用。"
http://php.net/manual/en/wrappers.ftp.php : [支持] “自 PHP 5.0.0 起:filesize()、filetype()、file_exists()、is_file() 和 is_dir()”
关于php - 如果服务器上是否存在文件夹,如何使用 PHP FTP 功能检查?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1554346/