Common php. ini configurations

Source: Internet
Author: User
Tags configuration php temporary file upload
Php. ini common configuration php. ini Common Configuration 1, language configuration short_open_tagOff; if some programs use & lt ;?? & Gt; short tag, which must be set to on2. the error message is usually set to display_errorsOn in the development environment. the error message error_reportingE_ALL is displayed. (if php 2 is used. ini common configuration
Common php. ini configuration 1. language configuration

Short_open_tag = Off; some programs use Short tag, which must be set to on

2. error message

Usually in the development environment, you need to set
Display_errors = On; error message displayed
Error_reporting = E_ALL; show all errors

(If you develop an open-source system twice, you can set it to error_reporting = E_ALL &~ E_NOTICE | E_STRICT)

?

In the release environment

Display_errors = off; no error message is displayed.

(Use the error log file to analyze the problem: error_log = "C: \ Windows \ temp \ php-errors.log"; error log file settings)

3. resource restrictions

Max_execution_time = 30; the maximum execution time is 30 seconds. to perform complex file operations, you need to modify the time to 120.

Memory_limit = 128 M? ; Memory limit. if a large file size needs to be parsed, the memory allocation should be increased.

4. Data processing

Default_charset = "UTF-8"; default is ISO-8859-1 and usually needs to be set to UTF-8

?

5. file Upload

File_uploads = On; whether to allow file Upload
Upload_max_filesize = 2 M; maximum size of uploaded files for one request, which must be changed to 10 M
Max_file_uploads = 20; maximum number of uploaded files per request
Upload_tmp_dir = "C: \ Windows \ Temp"; temporary file Upload Directory

?

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.