/www/wwwroot/cloud.lincq.cn/代码整理/layui开发的云盘/functions/hash.php 0, "msg" => "文件不存在!" ); $filehash = json_encode($filehash); echo $filehash; exit; } //如果文件不是项目路径 if(!strstr($filepath,$thedir)){ $filehash = array( "code" => 0, "msg" => "目录不正确!" ); $filehash = json_encode($filehash); echo $filehash; exit; } $md5 = md5_file($filepath); $sha1 = sha1_file($filepath); //计算文件hash $filehash = array( "code" => 1, "md5" => $md5, "sha1" => $sha1 ); $filehash = json_encode($filehash); echo $filehash; ?>