Maximum execution time for PHP setup code

Source: Internet
Author: User
PHP may take a long time to execute when it completes certain operations. This will need to set his execution time, or the server will stop execution after the execution time expires, the page appears blank. Two solutions are recommended below:

1.php File page settings:

<?php//Modify maximum execution time <a href= "https://www.baidu.com/s?wd=ini_set&tn=44039180_cpr&fenlei= Mv6quakxtzn0izrqihckpjm4nh00t1ydpvnsn10lphnvnvnyra7h0zwv5hcvrjm3rh6spfkwumw85hfynjn4nh6sgvpst6kdthsqpzwytjceqlgcpyw9uz4bm Y-bii4wuvyetgn-tlwguv3enhfsnj04njc1 "target=" _blank "class=" baidu-highlight ">ini_set</a> (' max_execution _time ', ' 0 ');//Modify this maximum <a href= "https://www.baidu.com/s?wd=%E8%BF%90%E8%A1%8C%E5%86%85%E5%AD%98&tn=44039180 _cpr&fenlei= Mv6quakxtzn0izrqihckpjm4nh00t1ydpvnsn10lphnvnvnyra7h0zwv5hcvrjm3rh6spfkwumw85hfynjn4nh6sgvpst6kdthsqpzwytjceqlgcpyw9uz4bm Y-bii4wuvyetgn-tlwguv3enhfsnj04njc1 "target=" _blank "class=" baidu-highlight "> Run memory </a><a href=" https:/ /www.baidu.com/s?wd=ini_set&tn=44039180_cpr&fenlei= Mv6quakxtzn0izrqihckpjm4nh00t1ydpvnsn10lphnvnvnyra7h0zwv5hcvrjm3rh6spfkwumw85hfynjn4nh6sgvpst6kdthsqpzwytjceqlgcpyw9uz4bm Y-bii4wuvyetgn-tlwguv3enhfsnj04njc1 "target=" _blank "class=" baidu-highlight ">ini_set</a> (' Memory_limit ') , ' 128M '); /*** * * code block omitted ... * * */?> 

PHP.ini configuration file settings (specific values, set as needed):

Max_execution_time = 60

Memory_limit = 128M

Note: If the execution memory is fully satisfied, no setup is required. Specific settings, depending on the circumstances of the flexible settings.

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.