这是我第一次在Mac上设置Xampp。 当我运行我的页面时,我收到错误:
Fatal error: require_once(): Failed opening required 'inc_db_init.php' (include_path='.:/home/site/includes') in /Volumes/untitled/Websites/site/www/test/index.php on line ...
在我的phpInfo()打印输出中,它显示了这个
include_path .:/home/site/includes .:/Applications/XAMPP/xamppfiles/lib/php
include_path是错误的。我需要它是
'Volumes'untitled'Websites'site'test_includes
phpInfo() 中显示的 php.ini 路径是这样的:
Loaded Configuration File /Applications/XAMPP/xamppfiles/etc/php.ini
因此,当我打开该文件时,任何地方都没有设置include_path。
我在页面所在的目录中有另一个 php.ini 文件,但没有被拾取。
知道如何解决这个问题吗?
所以,我安装了xampp的基本安装。它使用我的.htaccess文件而不是我的php.ini文件来确定include_path
这是我必须插入到我的 .htaccess 文件中的行
php_value include_path ".:/Volumes/untitled/Websites/site/test_includes"