超简略的php程序!可是报错
程序员文章站
2024-02-11 16:32:10
...
超简单的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; 后面的空格
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; 后面的空格
相关文章
相关视频
上一篇: Linux上MQTT环境搭建
下一篇: 思科路由器ios系统学习