PHP obtains the MD5 of the file and verifies whether it has been modified.
Since it is necessary to determine if the uploaded file has been modified, the MD5 value of the uploaded file needs to be recorded, so here's how to get the MD5 value of the file.
Md5_file ()
The Md5_file () function computes the MD5 hash of the file. The MD5 () function uses RSA data security, including the MD5 message selected passage algorithm. If successful, returns the computed MD5 hash, or False if it fails.
Syntax: MD5 (STRING,RAW)
§ parameter string, required to specify the file to be computed.
§ parameter charlist, optional. Specify hexadecimal or binary output format: TRUE-original 16 character binary format; FALSE-Default. 32 character hexadecimal number.
To store the MD5 hash of the "Test.doc" file:
Now we will detect if "Test.doc" has been changed (that is, if the MD5 hash has been changed):
The end.
http://www.bkjia.com/PHPjc/889410.html www.bkjia.com true http://www.bkjia.com/PHPjc/889410.html techarticle php to get the file MD5 and check whether it was modified, because it is necessary to determine whether the uploaded file has been modified, you need to record the MD5 value of the uploaded file, so here to say a bit about getting the file MD ...