Get MD5 Checksum for Very Large Files

前端 未结 5 2041
情歌与酒
情歌与酒 2021-01-18 01:27

I\'ve written a script that reads through all files in a directory and returns md5 hash for each file. However, it renders nothing for a rather large file. I assume that t

5条回答
  •  孤街浪徒
    2021-01-18 02:02

    If you're hitting an execution time limit or maximum execution time, PHP should be throwing an error message to that effect. Check your error logs. If you are hitting a limit, you can set the maximum values for PHP memory usage and execution time in your php.ini file:

    memory_limit = 16M 
    

    will set max memory usage to 16 megs. For maximum execution time:

    max_execution_time = 30
    

    will set maximum execution time to 30 seconds.

提交回复
热议问题