The reason for this is because if you have ?> and then an extra line, this extra line can cause problems as it will be interpeted as content and will cause "cannot send headers because headers have already been sent" errors (or similar - too lazy to look up actual verbiage).
Regards
----
Jeremy Brown
Senior Web Developer
Spear One
972.661.6038
www.spearone.com
-----Original Message-----
From: spaceage [mailto:davidlh@mac.com]
Sent: Friday, August 22, 2008 2:50 PM
To: fw-mvc@lists.zend.com
Subject: [fw-mvc] controller syntax
As a noob, I just learned the hard way about the problem with having a
closing "?>" in a controller file. This seems highly unorthodox, plus I
don't recall reading anything about this in the docs here...I found an
obscure reference in the "Practical Web 2.0" book.
My questions are:
1) Is it always the case that controller files DO NOT have a closing "?>"?
2) Are there other areas of the framework where you must omit the closing
"?>"?
--
View this message in context: http://www.nabble.com/controller-syntax-tp19114427p19114427.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论