我有一个WHM面板的服务器。 操作系统是CentOS。 当我在public_html中放置一个php.ini ,PHP停止读取/usr/local/lib/php.ini 。
当我比较phpinfo()的结果时,我所看到的是;
error_log error_log error_log
becames
error_log没有值没有值
PHP如何读取主php.ini指令,除非我在本地php.ini中添加指令。
PS:COPPYING主php.ini内容到本地php.ini不是一个选项。
简短的回答:你不能:
https://stackoverflow.com/questions/1391808/how-do-i-include-a-php-ini-file-in-another-php-ini-file
但是,您可以将php ini指令放入.htaccess文件中:
http://php.net/manual/en/configuration.changes.php
或者在应用程序本身中使用ini_set函数: