Home > Article > Backend Development > How to dynamically set php.ini
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.
##
php -ini | grep short_open_tag //查看 php.ini 配置
Dynamic settings
ini_set(string $varname , string $newvalue); ini_set('date.timezone', 'Asia/Shanghai'); //设置时区 ini_set('display_errors', '1'); //设置显示错误 ini_set('memory_limit', '256M'); //设置最大内存限制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!