duanji5746 2015-03-12 21:32
浏览 142

如何在xampp install for mac中设置include_path

it's my first time setting up xampp on mac. When I run my page, I receive the error:

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 ...

In my phpInfo() printout it shows this

include_path    .:/home/site/includes   .:/Applications/XAMPP/xamppfiles/lib/php

The include_path is wrong. I need it to be

\Volumes\untitled\Websites\site\test_includes

The php.ini path shown in phpInfo() is this:

Loaded Configuration File   /Applications/XAMPP/xamppfiles/etc/php.ini

So when I open up that file, there is no include_path set anywhere.

I have another php.ini file in the directory from which the pages are in but it is not being picked up.

Any idea how to fix this?

  • 写回答

1条回答 默认 最新

  • doulu0266 2015-03-12 22:02
    关注

    So, I installed the basic installation of xampp. It was using my .htaccess file instead of my php.ini file to determine the include_path

    This is the line I had to insert into my .htaccess file

    php_value include_path ".:/Volumes/untitled/Websites/site/test_includes"
    
    评论

报告相同问题?

悬赏问题

  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮