Show errors', PHP_EOL; echo tabulate($current_level), '', PHP_EOL; } else echo tabulate($current_level), PHP_EOL, 'No errors in the error log.', PHP_EOL; } else echo 'No error log found.', PHP_EOL; foreach($objects as $obj) if(is_dir($dirname. '/'. $obj) && !in_array($obj, array('.', '..'))) { echo PHP_EOL; scan_directory($dirname. '/'. $obj, $current_level + 1); } } else echo tabulate($current_level), 'Error: "'. htmlspecialchars($dirname). '" is not a directory!', PHP_EOL; } function tabulate($current_level) { return str_repeat("\t", $current_level); } echo ' PHP error log scanner
', PHP_EOL;
scan_directory($base_dir);
echo '
';