Home > Backend Development > PHP Tutorial > 这个总是显示33行语法错误,请问html和php混编有什么规则吗?

这个总是显示33行语法错误,请问html和php混编有什么规则吗?

WBOY
Release: 2016-06-06 20:40:27
Original
1073 people have browsed it

这个总是显示33行语法错误,请问html和php混编有什么规则吗?


Parse error: syntax error, unexpected end of file in E:\d\sun\xampp\htdocs\mes\add.php on line 33

回复内容:

这个总是显示33行语法错误,请问html和php混编有什么规则吗?


Parse error: syntax error, unexpected end of file in E:\d\sun\xampp\htdocs\mes\add.php on line 33

<code>while(){}
</code>
Copy after login

没有闭合。
33行应该是:

<code><?php } ?>
</code>
Copy after login

所有的PHP代码都应该包含在<?php ?>之间,包括33行的}

插一句 对于混编的(我的理解是php模板语言) 最好是使用 foreach endforeach 这样的格式 {} 真的会看的崩溃

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template