小编use*_*482的帖子

语法错误,意外T_ENCAPSED_AND_WHITESPACE,期待T_STRING或T_VARIABLE或T_NUM_STRING

我一直在盯着这段代码几个小时,我无法弄清楚我的错误在哪里.我知道这个语法错误通常会因为一些丢失或不合适的大括号或单/双引号的问题而出现,我不确定我的代码中是否有任何一个.我现在只是想修复我的语法,所以我可以让代码完全编译.任何帮助将非常感激.这是我的代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head> 
<title>Add to and Read from the Database</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head> 
<body>

<?php
function print_form() {
echo <<<END
         <form action="$_SERVER[PHP_SELF]" method="post">

    <h3>Please put your comments below.</h3>

<input type="hidden" name="stage" value="process" >
<p>Name:</p>
<input type="text" size="30" name="WholeName" />
<p>Comment:</p>
<input type="text" size="200" name="Comment" />

<input type ="submit"  value ="Submit" >
</form>
END;    

    }
function process_form() {

print "<p>adding comment...</p>";

$Name = $_POST['WholeName'];
$Comment = $_POST['Comment']; …
Run Code Online (Sandbox Code Playgroud)

php syntax parsing

14
推荐指数
2
解决办法
13万
查看次数

标签 统计

parsing ×1

php ×1

syntax ×1