Change PHP.ini location file?

纵饮孤独 提交于 2019-12-04 06:00:58

Use PHPIniDir directive in apache config file after LoadModule :

example:

LoadModule php5_module /path/to/php5_module

PHPIniDir path/to/php.ini

Or set the PHPRC environment variable:

example:

export PHPRC=path/to/php.ini

If you are on Windows and using XAMPP, you can probably edit the file: xampp\apache\conf\extra\httpd-xampp.conf, and change the php.ini location as below:

<IfModule php5_module>
     PHPINIDir "/xampp/php-5.6.5"
</IfModule>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!