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?
Reply to discussion (solution)
There is a space before or after the end of the separator
Delete the space behind the EOF;
Cnm qnmd
These two strings are recognized by the system. now it is a Chinese society. php does not allow swearing characters, so they are blocked!
Okay, it means it has never been used <learned
There is a space behind the separator. check it yourself.