Each zend framework script begins from "<?php", but they are have not at the end "?>". Does it makes for special purpose or only for simplifying?
Thanks!
zend framework scripts
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: zend framework scripts
Only for simplifying. When the PHP parser reached the end of the script it will close everything, so the ?> is not required. Sometimes you will have a space or newline after the ?> which will cause "headers sent" errors but it difficult to track down. So it is both not necessary and can cause a problem.
(#10850)
Re: zend framework scripts
Thank you very much!arborint wrote:Only for simplifying. When the PHP parser reached the end of the script it will close everything, so the ?> is not required. Sometimes you will have a space or newline after the ?> which will cause "headers sent" errors but it difficult to track down. So it is both not necessary and can cause a problem.