Announcement
iPhone DZone: Fresh Links On Your iPhone by matt at Sat Jul 05 14:09:51 EDT 2008
Reading DZone on your iPhone just got a little bit easier. Visit http://dzone.com/iphone from your iPhone to try out our beta iPhone support. You can view stories, filter by tags, and login. We'd appreciate your feedback at feedback@dzone.com.
Apathy is the suck. Login and vote now.
By nerdyhearn
via nerdyhearn.com
Submitted: Mar 24 2008 / 18:40
Comments
lhoguin replied ago:
Yeah well just don't put the closing tag "?>" and you'll never run on this problem again.
Also something to know is that "?>" will remove the (one) newline following it, but only one, and only if it directly follows.
nerdyhearn replied ago:
Not putting the closing "?>" is not an option if you are including multiple files. This would render the PHP invalid and you would receive errors.
This is considering the case that you are doing something like
include_once("myfile1.php");
include_once("myfile2.php");
where each file must be valid and complete PHP. If either of those files contain an extra newline and they are included at the top of your XML-generation file then you have an invalid XML file because the first line is not the XML declaration (it is the newline from one of the included files)
Thanks for the feedback!
Voters For This Link (2)
Voters Against This Link (0)