duanpanzhu2910 2014-01-09 11:28
浏览 26
已采纳

require_once真的在哪儿?

I have 2 installations of php for 2 versions of joomla on my windows computer.

I get this error when executing an application:

PHP Warning: Uncaught exception 'ErrorException' with message 'require_once(Cache/Lite.php): failed to open stream: No such file or directory' in C:\xampp\apps\joomla\htdocs\libraries\joomla\cache\storage\cachelite.php:79

The line is

require_once 'Cache/Lite.php';

Well there IS this file called Lite.php in:

C:\xampp\php\pear\Cache\Lite.php

I have a second php version installed, this might interfere. None the less, I removed the PATH entry of the second php version. I copied the folder to the second php installation, and I added the other php version to the path. Didn't help.

How can I find out where require_once '' is actually looking for?

Or how would you try to fix this?

  • 写回答

3条回答 默认 最新

  • down100009 2014-01-09 11:32
    关注

    You can see the include path by:

    <?php
    echo get_include_path();
    ?>
    

    If you need to change this, then you will need to modify your php.ini file or use set_include_path()

    Remember to include your current include_path, when setting a new one:

    <?php
    $new_path = '/usr/lib/pear';
    set_include_path(get_include_path() . PATH_SEPARATOR . $new_path);
    ?>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画