【发布时间】:2020-01-24 12:33:04
【问题描述】:
我遇到了标记验证问题,这是由表单中的 php 标记引起的,不知道如何解决。这是导致问题的行:
<input type="hidden" name="Forward" value="<?php echo $Goto; ?>">
验证错误是:
Error: No space between attributes.
At line 30, column 49
7900' colspan="5"><span style=
Error: Quote " in attribute name. Probable cause: Matching quote missing somewhere earlier.
At line 30, column 50
900' colspan="5"><span style='
Warning: Attribute 5" is not serializable as XML 1.0.
From line 28, column 2; to line 30, column 51
s"><br/>↩ <input type="hidden" name="Forward" value="<br />↩<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'>↩<tr><th align='left' bgcolor='#f57900' colspan="5"><span
然后是大约 30 个用于表格的杂散结束标记。错误中的大部分代码在页面上无处出现,删除 php echo 使其验证成功。如果有更多信息有帮助,请告诉我。
【问题讨论】:
-
$Goto中有什么内容? -
用于include "$Goto.php";根据帖子重定向。我还没学过渲染。仍然是一名大学学生,他们只是想让我验证我的作业
-
好吧,如果
$Goto包含双引号,那么您会看到这会混淆问题,因为您的浏览器会将其视为value属性的结尾。如果你var_dump()它,该变量包含什么? -
它包含正确的字符串,CustomerList、OrderList 或 ProductDetails,具体取决于用户从哪个页面重定向
-
向我们展示呈现的 HTML。
标签: php html validation