我如何包含在PHP中 [英] How do I include in PHP

查看:62
本文介绍了我如何包含在PHP中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿我正在用php编辑一个网站,我有一些麻烦,包括一个不同的php文件,这可能是一个愚蠢的错误,但有任何方法我可以解决它



包括'head.php';?>





< img src =logos。 pngheight =100width =100/>

Hey I'm editing a site with php and I'm having some troulble including a different php file, it's probably a silly mistake but is there any way I could fix it

include'header.php';?>


<img src="logos.png" height="100" width="100" />





< img src =tribe.pngheight =200width =700align =middle/>



<img src="tribe.png" height="200" width="700" align="middle" />



< input type =textname =lnamesize =25placeholder =您的姓氏/>


<input type="text" name="lname" size="25" placeholder="Your Last Name" />



< input type =textname =usernamesize =25placeholder =Your UserName/>


<input type="text" name="username" size="25" placeholder="Your UserName" />



< input type =textname =emailsize =25placeholder =Your Email/>


<input type="text" name="email" size="25" placeholder="Your Email" />



< input type =textname =email2size =25placeholder =Re Enter Email/>


<input type="text" name="email2" size="25" placeholder="Re Enter Email" />



< input type =textname =passwordsize =25placeholder =Your Password/>


<input type="text" name="password" size="25" placeholder="Your Password" />



< input type =textname =password2size =25placeholder =Re enter Password/>


<input type="text" name="password2" size="25" placeholder="Re enter Password" />



< input type =submitname =submitvalue =注册! />

< / form>


<input type="submit" name="submit" value="Sign Up!" />
</form>

推荐答案

你真的写了 include 没有'<?php ...'>?



这是正确的语法:PHP:include [ ^ ]。



参见:

PHP:require [ ^ ],

PHP:require_once [ ^ ]。



请注意,文件可能找不到,丢失,名称未命中无论如何,这里没有什么困难。



-SA
Did you really write include without '<?php...'>?

This is right syntax: PHP: include[^].

See also:
PHP: require[^],
PHP: require_once[^].

Note that the file could be not found, missing, its name misspelled, etc. Anyway, there is nothing difficult here.

—SA


这篇关于我如何包含在PHP中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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