Eclipse PHP 文件无法在同一项目文件夹中看到 html 文件


Eclipse PHP file not able to see html file in same project folder

我正在使用在索引中包含函数.php文件来查找标头.html文件并收到以下 2 个错误:

警告:包括(includes/header.html):无法打开流:没有这样的 C:''wamp''www''Projects''Chapter Three''index.php 中的文件或目录 第 3 行

&

警告:include():打开 的"includes/header.html"失败 包含 (include_path='.;C:''php''pear') in C:''wamp''www''项目''第三章''索引.php 在第 3 行

我通过资源管理器验证了索引.php标题.html位于同一目录中,那么我还应该检查什么?谢谢!

你需要在

包含 URL 周围加上引号,比如 include 'home.html'; ,如果这不起作用,请尝试在 url 之前抛出/,include '/home.html';