How to set php.ini location?

后端 未结 1 1709
梦如初夏
梦如初夏 2021-01-17 07:33

I just installed PHP, Apache and MySQL, did some changes to the configuration files and it works but phpinfo() says it looks for php.ini in C:\\Windows. How to make it look

相关标签:
1条回答
  • 2021-01-17 07:53

    Taken word for word from the docs...

    As of PHP 5.2.0, the location of the php.ini file can be set for different versions of PHP. The following registry keys are examined in order: [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z], [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y] and [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x], where x, y and z mean the PHP major, minor and release versions. If there is a value for IniFilePath in any of these keys, the first one found will be used as the location of the php.ini (Windows only).

    0 讨论(0)
提交回复
热议问题