本文主要和大家分享php代码实现统计功能,希望能帮助大家学会php代码如何实现统计的方法。
";
$counts += ($total - $space - $notes);
}
if (is_file($filename)) {
codeCount($filename);
} else
if (is_dir($filename)) {
if ($dh = opendir($filename)) {
while (($file = readdir($dh)) != false) {
// 文件名的全路径 包含文件名
$filePath = $filename . $file;
// 获取文件修改时间
if (is_file($filePath)) {
codeCount($filePath);
}
}
closedir($dh);
}
}
echo "
" . $counts;//输出总的代码量
?>相关推荐:











