【问题标题】:How can i fix this message: warning require_once failed to open stream? [duplicate]如何修复此消息:警告 require_once 无法打开流? [复制]
【发布时间】:2016-09-20 12:36:15
【问题描述】:

我已经安装了 codeigniter 和杂货店杂货,我得到它来显示我的数据库,然后突然我收到这条消息:

Warning: require_once(C:\xampp\htdocs\stlc_tables\config/constants.php): failed to open stream: No such file or directory in C:\xampp\htdocs\stlc_tables\system\core\CodeIgniter.php on line 70

Fatal error: require_once(): Failed opening required 'C:\xampp\htdocs\stlc_tables\config/constants.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\stlc_tables\system\core\CodeIgniter.php on line 70

我该如何解决这个问题?这是什么意思?谢谢

【问题讨论】:

  • 通过转到C:\xampp\htdocs 并检查实际文件路径是什么。
  • 这里你的路径是错误的C:\xampp\htdocs\stlc_tables\config/constants.php。你在 CI 中使用 FCPATH
  • 我是新手,我该怎么做?
  • @excelsiorone 在你使用require_once的地方添加你的代码??
  • @VicSeedoubleyew 看起来不错,谢谢

标签: php mysql codeigniter grocery-crud


【解决方案1】:

这是什么意思?

这意味着您尝试加载到脚本的文件不存在。在找不到文件的情况下使用 require 或 require_once 加载文件会导致致命错误(反对包含 include_once)。

我该如何解决这个问题?

通过确保给定文件存在于给定位置并且可读。

【讨论】:

    猜你喜欢
    • 2019-09-17
    • 1970-01-01
    • 1970-01-01
    • 2017-09-14
    • 2014-11-18
    • 2019-12-08
    • 1970-01-01
    • 2011-09-13
    • 1970-01-01
    相关资源
    最近更新 更多