Home > Backend Development > PHP Tutorial > PHP 类里面如何设置set_time_limit() 呢?文档说要加在第一行

PHP 类里面如何设置set_time_limit() 呢?文档说要加在第一行

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:40:03
Original
1428 people have browsed it

PHP 类里面如何设置set_time_limit() 呢?文档说要加在第一行,难道放在构造函数里面?

回复内容:

PHP 类里面如何设置set_time_limit() 呢?文档说要加在第一行,难道放在构造函数里面?

set_time_limit 是针对一次脚本执行的,不能针对一个类

最初的回答:放在入口文件的首行

后续更新(原来在评论里面,提上来避免误导他人):
嗯,我理解错了,不需要放在文档首行。只是不放在首行的话会不会累计前面执行已经消耗的时间。

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template