【问题标题】:Warning: include_once(headerSite.php): failed to open stream: No such file or directory [closed]警告:include_once(headerSite.php):无法打开流:没有这样的文件或目录[关闭]
【发布时间】:2016-01-03 08:48:32
【问题描述】:

我是 PHP 新手,遇到这些错误

警告:include_once(headerSite.php):无法打开流:第 3 行的 C:\xampp\htdocs\dbtest\index.php 中没有这样的文件或目录

警告:include_once():在第 3 行的 C:\xampp\htdocs\dbtest\index.php 中打开 'headerSite.php' 以包含 (include_path='.;C:\xampp\php\PEAR') 失败

我能做些什么来解决这个问题?

【问题讨论】:

  • 欢迎来到 SO。请阅读stackoverflow.com/help/how-to-ask 并学习如何写一个好问题。您至少应该发布 index.php 的代码。是否存在任何文件 headerSite.php?它存储在哪里?
  • 欢迎来到 SO。请访问help center 了解询问内容和方式。因此,您的问题是题外话
  • 经常会遇到这个错误,要快速解决它,请按照以下步骤操作:stackoverflow.com/a/36577021/2873507

标签: php html mysql apache


【解决方案1】:

headerSite.php文件放入2个单引号中为:

 include_once('headerSite.php');

【讨论】:

猜你喜欢
  • 2018-03-01
  • 1970-01-01
  • 2017-03-01
  • 1970-01-01
  • 2016-07-24
  • 2017-06-20
  • 2017-06-04
  • 2014-01-04
  • 2012-11-21
相关资源
最近更新 更多