PHP error Parseerror: syntaxerror, unexpectedendoffileinte

Source: Internet
Author: User
This article mainly introduces the PHP error Parseerror: syntaxerror, unexpectedendoffileintest. phponline12 solution. For more information, see

This article mainly introduces the PHP error Parse error: syntax error, unexpected end of file in test. php on line 12 solution. For more information, see

When writing a PHP program today, the following error always occurs: Parse error: syntax error, unexpected end of file in *. php on line *, then I find the file according to the prompt, and the error always prompts the last line of error. I find the last line and find it dizzy. What is the error, it takes a long time to locate the problem and share it with you.

The cause of this error is a syntax error. It must have been caused by irregular writing of the PHP program. I later read it one by one and found that the PHP statement identifier was wrong, normally, it should be like this: <? Php Your PHP statement?>, I wrote it like this: <? Your PHP statement?>, Of course, writing this is good, but I didn't enable the short tag in php. ini, so this error occurs. Pay attention to it. <? There is a space behind php. This error will also occur if you do not write it. Although this error is accidental, it is still difficult to find it. Please pay attention to it.

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.