PHP 函数 dir() php foreach 语句 PHP 函数 getcwd() PHP 函数 dir() <?php $d = dir("/var/www/"); echo "Handle: " . $d->handle . "\n"; echo "Path: " . $d->path . "\n"; while (false !== ($entry = $d->read())) { echo $entry."\n"; } $d->close(); ?> php foreach 语句 PHP 函数 getcwd()