如何用PHP判断一个文件夹是否为空

2025-03-13 01:18:07
推荐回答(1个)
回答1:

$a=array_diff(scandir($dir),array('..','.'));
//数组为空代表文件夹为空