php md5_file()

WBOY
Release: 2016-06-23 13:32:06
Original
1460 people have browsed it

md5_file() 函数计算文件的 MD5 散列

在本例中,我们将检测 "test.txt" 是否已被更改(即是否 MD5 散列已被更改):

 

<?php$md5file = file_get_contents("md5file.txt");if (md5_file("test.txt")== $md5file)  {  echo "The file is ok.";  }else  {  echo "The file has been changed.";  }?>
Copy after login

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template