PHP include()错误 [英] PHP include() Error

查看:290
本文介绍了PHP include()错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用include将导航栏和页脚附加到我网站上的页面。导航栏完美运行,但页脚不断给我这个错误:

I am using include to attach a navbar and a footer to pages on my site. The navbar works perfectly but the footer keeps giving me this error:

`警告:包括(C:\inetpub \ www.root ooter。 php)[function.include]:无法打开流:第69行的C:\ Inetpub \wwwroot \ templatewip.php中的参数无效

`Warning: include(C:\inetpub\wwwroot ooter.php) [function.include]: failed to open stream: Invalid argument in C:\Inetpub\wwwroot\templatewip.php on line 69

警告: include()[function.include]:无法打开'C:\inetpub \ www.root ooter.php'以包含(include_path ='。; c:\ php \ include; C:\\ \\ Inetpub \ www.root \')在C:\ Inetpub \ www.root \ templatewip.php第69行。

Warning: include() [function.include]: Failed opening 'C:\inetpub\wwwroot ooter.php' for inclusion (include_path='.;c:\php\includes;C:\Inetpub\wwwroot\') in C:\Inetpub\wwwroot\templatewip.php on line 69`

这是代码:

< div id =footer>
<?php include(C:\inetpub\wwwroot \ footer.php); ?>
< / div>

如果有帮助,这是导航栏的工作代码:

If it helps, here is the working code for the navbar:

< div class =navbar>
<?php include(C:\inetpub\wwwroot\menuembed.php); ?>
< / div>

推荐答案

\ f 是换页的转义字符。因此,如果你的字符串中有 \f ,你也需要转义斜杠:

\f is the escape character for a form feed. So if you have \f in your string you need to escape the slash, too:

<div id="footer"> <?php include("C:\inetpub\wwwroot\\footer.php"); ?> </div>

这篇关于PHP include()错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆