Home  >  Article  >  Backend Development  >  php Parse error: syntax error, unexpected end of file

php Parse error: syntax error, unexpected end of file

WBOY
WBOYOriginal
2016-07-29 09:00:414214browse

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


php Parse error: syntax error, unexpected end of file

The above has introduced php Parse error: syntax error, unexpected end of file, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn