超简单的php程序!可是报错!
if ($_COOKIE['Onclick_Button_ID'] == "btn-newquestion")
{
$display_block =cnm
END_OF_TEXT;
echo $display_block;
}
else if ($_COOKIE['Onclick_Button_ID'] == "btn-viewquestion")
{
$display_block =qnmd
EOF;
echo $display_block;
}
?>
这样就报:
Parse error: syntax error, unexpected end of file in C:\wamp\www\Zhuzhenqi\Modal_Content.php on line 16
可是当我改成这样时,就没错了:
if ($_COOKIE['Onclick_Button_ID'] == "btn-newquestion")
{
$display_block =cnm
END_OF_TEXT;
echo $display_block;
}
else if ($_COOKIE['Onclick_Button_ID'] == "btn-viewquestion")
{
echo $display_block;
}
?>
但是我实在没看出来
$display_block =qnmd
EOF;
有什么问题啊
------解决方案--------------------
定界符结尾前面或后面有空格
------解决方案--------------------
删去 EOF; 后面的空格