我如何包含在PHP中 [英] How do I include in 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 writeinclude
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屋!