Use md5_file() to generate local file signature database
Ensuring file integrity is a very critical step when managing a large number of local files (such as software distribution packages, documents, media resources, etc.). An effective way is to generate its MD5 signature for each file and store it in a database for subsequent checksum change detection. PHP provides a very convenient function - md5_file(), which can directly return the MD5 checksum of a file.
md5_file