echo<<< _END无效

时间:2011-12-15 19:21:53

标签: php html sql

我的代码下面嵌入了我的php标签,但它没有读取HTML,有谁知道为什么?任何帮助,将不胜感激。

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;

1 个答案:

答案 0 :(得分:4)

问题在于空格,使用&lt;&lt;&lt;&lt; _END语句时要小心,因为默认文本编辑器可能会缩进它。必须没有空格。