function ShuLiang($filename) { if(is_dir($filename)) { $attr = glob($filename."/*"); $sl=0; foreach($attr as $v) { if(is_dir($v)) { $sl = $sl+ShuLiang($v); } else { $sl++; } } return $sl; } else if(is_file($filename)) { return 1; } else { return 0; }
时间: 2024-10-05 05:04:51