回声<<< _END不起作用 [英] echo <<<_END not working

查看:59
本文介绍了回声<<< _END不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的php标记中嵌入了下面的代码,但是它不读取html,有人知道为什么吗?任何帮助,将不胜感激.

I have the code bellow embedded in my php tags, however it does not read the html, does anyone know why? Any help would be appreciated.

echo <<<_END
<pre>
<form action = "sqltest.php" method = "POST">
Author <input type = "text" name = "author" />
Title <input type = "text" name = "title" />
Category <input type = "text" name = "category" />
Year <input type = "text" name = "year" />
ISBN <input type = "text" name = "isbn" />
<input type = "submit" value = "Add Record" />
</form>
</pre>

_END;

推荐答案

问题出在空白,使用<<< _END语句时要小心,因为默认的文本编辑器可能会将其缩进.一定不能有空格.

The problem was with the whitespace, be careful when using the <<<_END statement as your default text editor may indent it. There must be no whitespace.

这篇关于回声&lt;&lt;&lt; _END不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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