PHP options and Information function library: Set_time_limit

Source: Internet
Author: User
Keywords PHP options php Chinese function Manual Set_time_limit information function library
Tags aliyun function function library html http information information function library php

Set_time_limit

(PH3, PHP4)

Set_time_limit---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Limit Maximum execution time

Syntax: void set_time_limit (int seconds)

Description:

Sets the number of seconds a program allows to execute, and if the time limit is reached, the program returns an error. Its preset limit time is 30 seconds, max_execution_time values are defined in the structure file (called Php3.ini in PHP3, PHP4 is called php.ini), and if the number of seconds is set to 0, there is no time limit.

When this function is called, set_time_limit () recalculates the longest execution time from zero, that is, if the maximum execution time is a preset 30 seconds, and it takes 25 seconds to execute the program before calling this function Set_time_limit (20). The maximum execution time of the program will be 45 seconds.

Note: When PHP is executed in safe mode, Set_time_limit () will not have a result unless it is a time limit for turning off safe mode or modifying the structure file (called Php3.ini in PHP3, called PHP.ini in PHP4).

Related Article

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.