Remember before during the training, the instructor told us that the end tag of PHP?> can not be added, and it is best not to add, said in some cases is necessary (forget what is the case)
What do you think of Daniel?
[PS: Of course, in the case of PHP mixed with HTML, it is bound to add the end tag]
Reply content:
Remember before during the training, the instructor told us that the end tag of PHP?> can not be added, and it is best not to add, said in some cases is necessary (forget what is the case)
What do you think of Daniel?
[PS: Of course, in the case of PHP mixed with HTML, it is bound to add the end tag]
cc:http://segmentfault.com/q/1010000000437998#a-1020000000438006
http://www.php.net/manual/zh/language.basic-syntax.phptags.php
If the file content is pure PHP code, it is best to remove the PHP end tag at the end of the file. This avoids having to accidentally add a space or line break after the PHP end tag, which causes PHP to start outputting these blanks, and there is no intention to output the script at this time.
The end of the end of the PHP tag is removed, first you must ensure that your script must be all written in PHP, and then get a definite answer, I think the end of the tag is not to delete this is all personal habits.
Generally speaking, a lot of programmers will not add, because the benefits of doing this can avoid a lot of code compile in the time of the strange strange error, and you remove?> but do not error, but you do not know what reason ...
This is my habit, I hope it will help you.