Parse Error:syntax error, unexpected end of file in *.php on line * Workaround this article mainly introduces PHP errors in parse Error:syntax error, Unexpec Ted end of file in test.php on line 12 workaround, the friend you need can refer to the following
There are always errors in writing PHP today: Parse error:syntax error, unexpected end of file in *.php on line *, then I follow the prompts to find the file, and then always prompt for the last line error , I found the last line found is
The cause of this error is a syntax error, it is certainly the PHP program written by the non-standard, I later found that the PHP statement identifier is wrong, the normal situation should be this: <?php your PHP statement?, I wrote this: < Your PHP statement?, of course, it is good to write, but I did not open the php.ini in the short label, so it caused the error, in addition to note that there is a space behind <?php, if not write will also appear this error, although this error is inadvertently, But sometimes it's hard to find out, so let's take a look.
Find Short_open_tag in php.ini
Change Short_open_tag = off to Short_open_tag = On
Turn on the segment label mode to solve the problem.
General PHP Tags: <?php?>
PHP short Tags: <??>
Parse error:syntax error, unexpected end of file in *.php on line * workaround