为什么下面用$str=opendir("/filename/")打开不文件目录
$str=opendir("/filename/");//而要改成$str=opendir("./filename/")才能打开
if (is_dir($str)){
if ($dh = opendir($str){
while (($file = readdir($dh)) !== false){
echo "filename:" . $file . "<br>";
}
closedir($dh);
}
} Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号