PHP string md5_file() FunctionPHP string md5_file() function is in-built important function. It is used to calculate the MD5 hash of a file. It uses the RSA Data Security. It returns the md5 hash on success, or FALSE on failure. Syntax:
Example 1Save it: "test.txt" file and past it "Hello PHP" string inside the file. Output: c540ce201d398a7d275c6e0c669097f3 Example 2We can store the MD5 hash of "test.txt" in a file: We can test if "test.txt" has been changed (if the MD5 hash has been changed): Output: The file is ok.
Next TopicPHP String
|