Super simple php program! But an error is reported! & Lt ;? Php & nbsp; if & nbsp; ($ _ COOKIE [Onclick_Button_ID] & nbsp; btn-newquestion) {$ display_block & nbsp; & lt; END_OF_TEXTcnmEND_OF_TEXT; echo & nbsp; $ display _ super simple php program! But an error is reported!
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;
}
?>
In this case, we will report:
Parse error: syntax error, unexpected end of file in C: \ wamp \ www \ Zhuzhenqi \ Modal_Content.php on line 16
But when I change it like this, that's right:
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;
}
?>
But I did not see it.
$ Display_block = < Qnmd
EOF;
What's the problem?
------ Solution --------------------
There is a space before or after the end of the separator
------ Solution --------------------
Delete the space behind the EOF;