嗨,我正在寻找一个通过链接为我提供文件 md5 的脚本如果有人知道如何制作这个文件,它会打印出 md5,请告诉我
我拥有的代码:
<?php
$cwd = $_SERVER['REQUEST_URI'];
$cwd = substr($cwd, 0, strrpos($cwd, '/' + 1));
function paintUndersideOfFox($c) {
global $cwd;
echo('<ul class="dirlist">');
$d = opendir($c);
while($f = readdir($d)) {
if(strpos($f, '.') === 0) continue;
$ff = $c . '/' . $f;
echo 'MD5 file hash of ' . $ff . ': ' . md5_file($ff);
echo('<li><a href="' . $cwd . $ff . '">' . $ff . '</a></li><br />');
if(is_dir($ff)) paintUndersideOfFox($ff);
}
echo('</ul>');
}
paintUndersideOfFox('.');
?>