1

我正在尝试从另一个共享系统读取远程目录文件,能够在浏览器中打开文件,但在使用 php 脚本opedir()函数读取时出错。

代码:

$filesDir = "file://css-app-002-s/cs/files/";

var_dump(is_dir($filesDir));

if ($handle = opendir($filesDir)) {
    $dirList = array_diff(scandir($filesDir), array('..', '.'));
}

print_r($dirList);

错误:

警告:opendir() [function.opendir]:不支持远程主机文件访问,file://css-app-002-s/cs/files/

4

0 回答 0