PHP study notes (1), php study notes_PHP tutorial

WBOY
Release: 2016-07-12 09:00:03
Original
779 people have browsed it

PHP study notes (1), php study notes

1. Set the maximum execution time in PHP:

In the PHP.ini file in PHP, the max_execution_time item specifies the maximum execution time of PHP. The default is 30 seconds. There are two options to modify it:

 1. Modify the value of max_execution_time directly in the PHP.ini file. However, this modification method requires the permission to modify the configuration file. Generally, modifications on the server require administrator permission.

 2. If you do not have permission, you can use ini_set("max_execution_time", "0"), to set it in the PHP program, where 0 means there is no execution time limit.

2. pathinfo() function: This function returns file path information in the form of an array. The usage is:

pathinfo(path, process_sections)

Where path is a required parameter, which is the path to be checked, process_sections is an optional parameter, the default value is all, possible values:

PATHINFO_DIRNAME only returns dirname

 PATHINFO_BASENAME only returns basename

 PATHINFO_EXTENSION only returns extension

By default, this function returns an array containing path information: [dirname] [basename] [extension]. If you do not want to obtain all the information, pathinfo() returns the string

3. PHP server forbidden to access type error:

This type of error is caused by access denied possibly being set in the configuration file. Find the corresponding in httpd.conf, comment out Deny from all and replace it with Allow from all or satisfy all.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1095474.htmlTechArticlePHP study notes (1), php study notes 1. Set the maximum execution time in PHP: in PHP In the PHP.ini file, the max_execution_time item specifies the maximum execution time of PHP. The default is 30 seconds...
Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template