PHP.INI不会更改include_path。为什么?

时间:2020-06-04 23:27:33

标签: php macos apache pear

我找到了我的php.ini,更改了它的include_path但没有任何改变。

致命错误:require_once():无法在第3行的/Library/WebServer/Documents/estudos/db_pear.php中打开所需的'System.php'(include_path ='.:')

我的phpinfo()表明我的include_path只是(。:)。 我在PHP.INI中的包含路径是('。:/ usr / local / share / pear')。 我的phpinfo()还在(/ etc)中显示了PHP.INI,命令行($php --ini)显示了:

Configuration File (php.ini) Path: /usr/local/etc/php/7.4
Loaded Configuration File:         /usr/local/etc/php/7.4/php.ini
Scan for additional .ini files in: /usr/local/etc/php/7.4/conf.d
Additional .ini files parsed:      /usr/local/etc/php/7.4/conf.d/ext-opcache.ini

我已经重新启动了我的apachectl和整个PC,但是什么也没有... 请我想使用PEAR框架! 谢谢!祝福!

1 个答案:

答案 0 :(得分:1)

我明白了,菲尔!

phpinfo()中的

/etc是php.ini的初始化位置,因此我只在其中放置了/usr/local/etc/php/7.4中唯一的php.ini,就可以了!

我很高兴!

谢谢我的兄弟的帮助-或尝试帮助。

相关问题