Super simple php program! However, an error is reported.

Source: Internet
Author: User
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;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.