0
下面的脚本工作正常,当前目录:但是列出文件夹不起作用
Array ([0] => firstfolder [1] => secondfolder)
它确实,:
<?php
$ignore = array ('.', '..', '.DS_Store', 'index.php');
$num_ordnernamen = array();
if ($handle = opendir('./')) {
while (false !== ($entry = readdir($handle))) {
if (!in_array($entry, $ignore) && is_dir($entry)) {
array_push($num_ordnernamen, $entry);
}
}
}
print_r ($num_ordnernamen);
?>
,它返回数组,因为它应该,不工作
if ($handle = opendir('../')) //or
if ($handle = opendir('..')) //or
if ($handle = opendir('../..'))
...或其他任何我试图让一个层面。我在这里错过了什么?