Home > Backend Development > PHP Tutorial > 指令分隔符?

指令分隔符?

WBOY
Release: 2016-06-23 14:25:10
Original
1123 people have browsed it

http://docs.php.net/manual/zh/language.basic-syntax.phptags.php
如果文件内容是纯 PHP 代码,最好在文件末尾删除 PHP 结束标记。这可以避免在 PHP 结束标记之后万一意外加入了空格或者换行符,会导致 PHP 开始输出这些空白,而脚本中此时并无输出的意图。 

问题:
1.

<?php    echo "QQQ"
Copy after login


为什么,出错?


回复讨论(解决方案)

或者省略最后行的“;”
或者省略最后的“?>”
但不能同时省略!

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