Home > Article > Backend Development > php Parse error: syntax error, unexpected end of file
When using xampp’s wordpress, when following the new theme, the following error occurred:
Parse error: syntax error, unexpected end of file. .
Then I found the file according to the prompts, and then the error always said that the last line was wrong. I found the last line and found that php did not end normally, that is,
?>
or
?>
I still got the same error after adding it. It took me a long time to find the problem, which is to turn on php short tag.
The specific method is to search for short_open_tag in the php.ini file
and change it to short_open_tag=On. If it is already On, it means that the short tag has been turned on, and there is no need to set it anymore