我正在尝试读取远程服务器上mp3文件的文件夹。 DirectoryIterator可以做到这一点吗?
$dir = "http://pspc.dyndns.info/~pspc/audio/2018-10-28_1528/";
$dit = new DirectoryIterator($dir);
foreach ($dit as $fileinfo) {
}
我遇到错误:
Uncaught UnexpectedValueException: DirectoryIterator::__construct(http:/pspc.dyndns.info/~pspc/audio/2018-10-28_1528/,http:/pspc.dyndns.info/~pspc/audio/2018-10-28_1528/): The filename, directory name, or volume label syntax is incorrect. (code: 123) in