Home > Backend Development > PHP Tutorial > php md5_file()

php md5_file()

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 13:32:06
Original
1506 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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template