Home >Backend Development >PHP Problem >How to modify php.ini on mac
How to modify php.ini on mac: 1. Execute the "sudo cp /private/etc/php.ini.default /private/etc/php.ini" command; 2. Directly modify the php.ini configuration file That’s it.
The operating environment of this article: macOS10.15 system, PHP7.1 version, MacBook Air 2019 computer
PHP usage modification php .ini configuration file (Mac)
##1. Configure php.ini# in the PHP environment that comes with Macsudo cp /private/etc/php.ini.default /private/etc/php.ini
cd /private/etc/sudo vi php.ini
2. Modify the php.ini configuration file in XAMPP For Mac
Whether it is allowed to upload files via http | |
The maximum execution time allowed for the script, if it exceeds this time, an error will be reported | |
Set the maximum amount of memory that a script can allocate to prevent runaway scripts from occupying too much memory. This instruction only takes effect when the –enable-memory-limit flag is set during compilation. | |
The maximum size of files allowed to be uploaded, this command must be smaller than post_max_size | |
The temporary storage directory for uploaded files | |
Allow the post method to accept the maximum size |
The original name of the client's last file | |
The MIME type of the file, the browser needs to provide support for this information, such as "image/gif" | |
The size of the uploaded file in bytes | |
The temporary file name stored on the server after the file is uploaded, usually the system default. It can be specified in upload_tmp_dir of php.ini, but setting it with the putenv() function will not work | |
Status code related to the file upload |
Status code related to the file upload . [‘error’] was added in PHP version 4.2.0. The following is its description: (They became constants after PHP3.0)
No error occurred, the file was uploaded successfully | |
The uploaded file exceeds the value limited by the upload_max_filesize option in php.ini | |
The size of the uploaded file exceeds the value specified by the MAX_FILE_SIZE option in the HTML form | |
Only part of the file was uploaded | |
No file was uploaded | |
The uploaded file size is 0 |
The above is the detailed content of How to modify php.ini on mac. For more information, please follow other related articles on the PHP Chinese website!