Remember that my tutor told us the php end tag during the training period? & Amp; gt; you can choose not to add it, and it is best not to add it. In some cases, it is necessary (forget what the situation is). What do you think of Daniel? [Ps: of course, in the case of a mix of php and html, it must be completed... remember that during the training, the instructor told us the php end tag?> You can not add it, and it is best not to add it. In some cases, it is necessary to forget the situation)
What do you think?
[Ps: Of course, the end tag must be added when php and html are mixed]
Reply content:
Remember that my tutor told us the php end tag during the training period?> You can not add it, and it is best not to add it. In some cases, it is necessary to forget the situation)
What do you think?
[Ps: Of course, the end tag must be added when php and html are mixed]
HTTP: 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 delete the PHP end mark at the end of the file. This avoids accidental addition of spaces or line breaks after the PHP end mark, which may cause PHP to start to output these spaces, but the script does not have the intention to output at this time.
To remove the end tag of php, you must first ensure that all your scripts are written in php and get a definite answer, I think it is my habit to delete the end tag or not.
In general, many programmers will not add this, because the benefits of doing so can avoid many inexplicable errors during code compilation, and you should remove them?> But you don't know why...
This is also my habit. I hope it will help you.