How to dynamically set php.ini

藏色散人
Release: 2023-03-01 20:30:02
Original
2559 people have browsed it

How to dynamically set php.ini: first open the php.ini file; then find the "ini_set()" configuration item; finally set the time zone, display error and maximum memory limit by modifying the parameters.

How to dynamically set php.ini##

php -ini | grep short_open_tag //查看 php.ini 配置
Copy after login

Dynamic settings

ini_set(string $varname , string $newvalue);
ini_set('date.timezone', 'Asia/Shanghai'); //设置时区
ini_set('display_errors', '1'); //设置显示错误
ini_set('memory_limit', '256M'); //设置最大内存限制
Copy after login

For more related knowledge, please visit

PHP Chinese website !

The above is the detailed content of How to dynamically set php.ini. For more information, please follow other related articles on the PHP Chinese website!

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