It's easy to use. md5_file is useless for 2 GB files. how can this problem be solved?

Source: Internet
Author: User
It's easy to use. md5_file is useless to 2 GB files. & lt ;? Php ?md5filemd5_file(&quot=1.zip & quot;); & nbsp; echo $ md5file ;? The >code is very simple. if the md5value is obtained, if 1.zip is several hundred megabytes or smaller, the md5 value can be read. if the file is large and I test more than 2 GB, it is easy to use, md5_file is useless for 2 GB files
$ Md5file = md5_file ("1.zip ");
Echo $ md5file;
?>


The code is very simple. if the md5value is obtained, if 1.zip is several hundred megabytes or smaller, the md5 value can be read. if the file is large and I test more than 2 GB, the value cannot be obtained. the page waits for a while and the display
Fatal error: Maximum execution time of 30 seconds exceeded in F: \ file \ getMD5.php on line 2


Tutorial

------ Solution --------------------
MD5 is used to extract data. 2 GB is naturally too large and will time out.
------ Solution --------------------
Set_time_limit (0 );
$ Md5file = md5_file ("1.zip ");
Echo $ md5file;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.