怎样用 glob() 方便地替代 opendir() 和相关函数
<?php
foreach (glob("*.txt") as $filename) {
echo "$filename size " . filesize($filename) . "\n";
}
?>
以上例程的输出类似于:
funclist.txt size 44686 funcsummary.txt size 267625 quickref.txt size 137820
转载于:https://blog.51cto.com/superfly81/1116932