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 vue3页面el-table页面数据过多
  • ¥100 vue3中融入gRPC-web
  • ¥15 kali环境运行volatility分析android内存文件,缺profile
  • ¥15 写uniapp时遇到的问题
  • ¥15 vs 2008 安装遇到问题
  • ¥15 matlab有限元法求解梁带有若干弹簧质量系统的固有频率
  • ¥15 找一个网络防御专家,外包的
  • ¥100 能不能让两张不同的图片md5值一样,(有尝)
  • ¥15 informer代码训练自己的数据集,改参数怎么改
  • ¥15 请看一下,学校实验要求,我需要具体代码