phpinfo()显示的页面里为什么有两个关于php.ini的路径呢?解决思路

WBOY
Release: 2016-06-13 10:16:58
Original
875 people have browsed it

phpinfo()显示的页面里为什么有两个关于php.ini的路径呢???
这两个哪个是决定php.ini文件位置的呢?

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Configuration File (php.ini) Path    C:\WINDOWS  Loaded Configuration File            D:\MyEnv\php5\php.ini  
Copy after login


我把两个路径下的php.ini都删除,则显示成:
PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Configuration File (php.ini) Path    C:\WINDOWS  Loaded Configuration File            (none)
Copy after login

然后用phpinfo()函数,发现还能正常输出,这是怎么回事?它不是已经读取不到配置文件了吗?为什么不报错呢?

谢谢大家!!!


------解决方案--------------------
WINDOWS环境下的PHP运行时首先在C:\WINDOWS里找配置文件,找不到就在PHP安装目录下找,两个目录都找不到就使用PHP默认的配置环境。所以你只要在C:\WINDOWS或PHP安装目录下至少有一个适当的PHP配置文件就可以了。
------解决方案--------------------
存在了就不需要显示了吧?
不知道,没测试过
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!