I am using cakePHP 1.2 and having trouble getting RSS working. My RSS output contains one blank line before the start of the first tag, breaking my RSS. I have checked all my modules, controllers, views, components, and helpers for blank space but didn't find anywhere. Did anyone experienced similar problem before and would be kind enough to tell me where possibly I am making a mistake or how to find where I might be inserting a blank line
On Nov 6, 10:15 am, bingo <ragra...@gmail.com> wrote:
> hi,
> I am using cakePHP 1.2 and having trouble getting RSS working. My RSS > output contains one blank line before the start of the first tag, > breaking my RSS. I have checked all my modules, controllers, views, > components, and helpers for blank space but didn't find anywhere. Did > anyone experienced similar problem before and would be kind enough to > tell me where possibly I am making a mistake or how to find where I > might be inserting a blank line
> Regards, > Ritesh
Have you got any code which contains ... ?> <?php ..
There really is only one cause. you could try issuing a header as the first line of your layout and see where it complains output already started.
The above command did help as now I am not getting any blank line before my xml declaration. But I am still getting some blank spaces before my xml declaration. I tried what you suggested but still not able to find any specific problem. Based on your suggestion, I changed my layout to look like this
> On Nov 6, 10:15 am, bingo <ragra...@gmail.com> wrote:
> > hi,
> > I am using cakePHP 1.2 and having trouble getting RSS working. My RSS > > output contains one blank line before the start of the first tag, > > breaking my RSS. I have checked all my modules, controllers, views, > > components, and helpers for blank space but didn't find anywhere. Did > > anyone experienced similar problem before and would be kind enough to > > tell me where possibly I am making a mistake or how to find where I > > might be inserting a blank line
> > Regards, > > Ritesh
> Have you got any code which contains ... ?> <?php ..
> There really is only one cause. you could try issuing a header as the > first line of your layout and see where it complains output already > started.
> The above command did help as now I am not getting any blank line > before my xml declaration. But I am still getting some blank spaces > before my xml declaration. I tried what you suggested but still not > able to find any specific problem. Based on your suggestion, I changed > my layout to look like this
> However if I set debug to 2, I am getting this error message
> Parse error: parse error, unexpected T_STRING in D:\xampp\xampp\htdocs > \memento\app\views\layouts\rss\default.ctp on line 1
> I am still clueless. :-(
> Regards, > Ritesh
> On Nov 6, 5:49 am, AD7six <andydawso...@gmail.com> wrote:
> > On Nov 6, 10:15 am, bingo <ragra...@gmail.com> wrote:
> > > hi,
> > > I am using cakePHP 1.2 and having trouble getting RSS working. My RSS > > > output contains one blank line before the start of the first tag, > > > breaking my RSS. I have checked all my modules, controllers, views, > > > components, and helpers for blank space but didn't find anywhere. Did > > > anyone experienced similar problem before and would be kind enough to > > > tell me where possibly I am making a mistake or how to find where I > > > might be inserting a blank line
> > > Regards, > > > Ritesh
> > Have you got any code which contains ... ?> <?php ..
> > There really is only one cause. you could try issuing a header as the > > first line of your layout and see where it complains output already > > started.
> > The above command did help as now I am not getting any blank line > > before my xml declaration. But I am still getting some blank spaces > > before my xml declaration. I tried what you suggested but still not > > able to find any specific problem. Based on your suggestion, I changed > > my layout to look like this
> > However if I set debug to 2, I am getting this error message
> > Parse error: parse error, unexpected T_STRING in D:\xampp\xampp\htdocs > > \memento\app\views\layouts\rss\default.ctp on line 1
> > I am still clueless. :-(
> > Regards, > > Ritesh
> > On Nov 6, 5:49 am, AD7six <andydawso...@gmail.com> wrote:
> > > On Nov 6, 10:15 am, bingo <ragra...@gmail.com> wrote:
> > > > hi,
> > > > I am using cakePHP 1.2 and having trouble getting RSS working. My RSS > > > > output contains one blank line before the start of the first tag, > > > > breaking my RSS. I have checked all my modules, controllers, views, > > > > components, and helpers for blank space but didn't find anywhere. Did > > > > anyone experienced similar problem before and would be kind enough to > > > > tell me where possibly I am making a mistake or how to find where I > > > > might be inserting a blank line
> > > > Regards, > > > > Ritesh
> > > Have you got any code which contains ... ?> <?php ..
> > > There really is only one cause. you could try issuing a header as the > > > first line of your layout and see where it complains output already > > > started.
> > > The above command did help as now I am not getting any blank line > > > before my xml declaration. But I am still getting some blank spaces > > > before my xml declaration. I tried what you suggested but still not > > > able to find any specific problem. Based on your suggestion, I changed > > > my layout to look like this
> > > However if I set debug to 2, I am getting this error message
> > > Parse error: parse error, unexpected T_STRING in D:\xampp\xampp\htdocs > > > \memento\app\views\layouts\rss\default.ctp on line 1
> > > I am still clueless. :-(
> > > Regards, > > > Ritesh
> > > On Nov 6, 5:49 am, AD7six <andydawso...@gmail.com> wrote:
> > > > On Nov 6, 10:15 am, bingo <ragra...@gmail.com> wrote:
> > > > > hi,
> > > > > I am using cakePHP 1.2 and having trouble getting RSS working. My RSS > > > > > output contains one blank line before the start of the first tag, > > > > > breaking my RSS. I have checked all my modules, controllers, views, > > > > > components, and helpers for blank space but didn't find anywhere. Did > > > > > anyone experienced similar problem before and would be kind enough to > > > > > tell me where possibly I am making a mistake or how to find where I > > > > > might be inserting a blank line
> > > > > Regards, > > > > > Ritesh
> > > > Have you got any code which contains ... ?> <?php ..
> > > > There really is only one cause. you could try issuing a header as the > > > > first line of your layout and see where it complains output already > > > > started.
On Nov 6, 1:37 pm, bingo <ragra...@gmail.com> wrote:
> hi Mike,
> you are right..I have short_open_tags on. But how does it matter?
because if you get a parse error, php will stop at that point issue an error message and dump the buffer it has in memory. have you got as output a full view with layout or just the view then?
in any event fixing a parseerror should be a no-brainer step forwards (you can avoid it by doing <?php echo "<?xml ... ?> if you can't turn off shorttags..
I tried what Jon suggested. But still getting space before my xml declaration :-( ...this is killing me...isn't there a good way to debug this problem. Searching on the forum, I have realized that many people struggle with this.
Regards, Ritesh
On Nov 6, 7:48 am, AD7six <andydawso...@gmail.com> wrote:
On Nov 6, 2:01 pm, bingo <ragra...@gmail.com> wrote:
> hi all,
> I tried what Jon suggested. But still getting space before my xml > declaration :-( ...this is killing me...isn't there a good way to > debug this problem. Searching on the forum, I have realized that many > people struggle with this.
"you could try issuing a header as the first line of your layout and see where it complains output already started. "
there are many threads because it's a common problem (or a common mistake).
> On Nov 6, 2:01 pm, bingo <ragra...@gmail.com> wrote:
> > hi all,
> > I tried what Jon suggested. But still getting space before my xml > > declaration :-( ...this is killing me...isn't there a good way to > > debug this problem. Searching on the forum, I have realized that many > > people struggle with this.
> "you could try issuing a header as the first line of your layout and > see where it complains output already > started. "
> there are many threads because it's a common problem (or a common > mistake).
I tried putting header in default layout for RSS, but didn't work. I didn't recieve that output buffer already started at XYZ. The only error that I am getting is "Invalid XML Declaration - Line: 1 Character: 6". I also tried putting header command in controller class, but that also didn't work. :-(
> On Nov 6, 2:01 pm, bingo <ragra...@gmail.com> wrote:
> > hi all,
> > I tried what Jon suggested. But still getting space before my xml > > declaration :-( ...this is killing me...isn't there a good way to > > debug this problem. Searching on the forum, I have realized that many > > people struggle with this.
> "you could try issuing a header as the first line of your layout and > see where it complains output already > started. "
> there are many threads because it's a common problem (or a common > mistake).
I have had this exact same problem it can hold you up for days..
Make sure you are using UTF-8 "BOMS".
Make sure tags in Model, Controller, and Views "<? php"............................ "?>" Have no spaces after or before them NONE. I found one in the cake folder in the app model. You have six spaces this is literally the cause of your frustrations. You should check every model, view, and controller.. It does suck but it is what is causing your problem.
On Nov 6, 1:54 pm, bingo <ragra...@gmail.com> wrote:
> I tried putting header in default layout for RSS, but didn't work. I > didn't recieve that output buffer already started at XYZ. The only > error that I am getting is "Invalid XML Declaration - Line: 1 > Character: 6". I also tried putting header command in controller > class, but that also didn't work. :-(
> This is frustrating :-( > isn't there any magic command that will automatically remove all the > trailing and leading spaces ?
> Regards, > Ritesh
> On Nov 6, 10:07 am, AD7six <andydawso...@gmail.com> wrote:
> > On Nov 6, 2:01 pm, bingo <ragra...@gmail.com> wrote:
> > > hi all,
> > > I tried what Jon suggested. But still getting space before my xml > > > declaration :-( ...this is killing me...isn't there a good way to > > > debug this problem. Searching on the forum, I have realized that many > > > people struggle with this.
> > "you could try issuing a header as the first line of your layout and > > see where it complains output already > > started. "
> > there are many threads because it's a common problem (or a common > > mistake).
> I have had this exact same problem it can hold you up for days..
> Make sure you are using UTF-8 "BOMS".
> Make sure tags in Model, Controller, and Views "<? > php"............................ "?>" > Have no spaces after or before them NONE. I found one in the cake > folder in the app model. You have six spaces this is literally the > cause of your frustrations. You should check every model, view, and > controller.. It does suck but it is what is causing your problem.
> On Nov 6, 1:54 pm, bingo <ragra...@gmail.com> wrote:
> > hi AD7six,
> > I tried putting header in default layout for RSS, but didn't work. I > > didn't recieve that output buffer already started at XYZ. The only > > error that I am getting is "Invalid XML Declaration - Line: 1 > > Character: 6". I also tried putting header command in controller > > class, but that also didn't work. :-(
> > This is frustrating :-( > > isn't there any magic command that will automatically remove all the > > trailing and leading spaces ?
> > Regards, > > Ritesh
> > On Nov 6, 10:07 am, AD7six <andydawso...@gmail.com> wrote:
> > > On Nov 6, 2:01 pm, bingo <ragra...@gmail.com> wrote:
> > > > hi all,
> > > > I tried what Jon suggested. But still getting space before my xml > > > > declaration :-( ...this is killing me...isn't there a good way to > > > > debug this problem. Searching on the forum, I have realized that many > > > > people struggle with this.
> > > "you could try issuing a header as the first line of your layout and > > > see where it complains output already > > > started. "
> > > there are many threads because it's a common problem (or a common > > > mistake).
I don't know in eclipse my guess is it would be associated with your overall preferences listed under encoding (google that) but you most likely have space before and after your "<?php" .... "?>" but do check your model view controllers all of them. It is a drag and it did take me several days to do this myself but it was worth it.
On Nov 6, 3:52 pm, bingo <ragra...@gmail.com> wrote:
> I am not sure if I understand what do you mean by UTF-8 "BOMS". How > can verify that. I am using eclipse as my PHP Editor.
> Regards, > Ritesh
> On Nov 6, 4:00 pm, seacloud9 <brendonsm...@seacloud9.org> wrote:
> > I have had this exact same problem it can hold you up for days..
> > Make sure you are using UTF-8 "BOMS".
> > Make sure tags in Model, Controller, and Views "<? > > php"............................ "?>" > > Have no spaces after or before them NONE. I found one in the cake > > folder in the app model. You have six spaces this is literally the > > cause of your frustrations. You should check every model, view, and > > controller.. It does suck but it is what is causing your problem.
> > On Nov 6, 1:54 pm, bingo <ragra...@gmail.com> wrote:
> > > hi AD7six,
> > > I tried putting header in default layout for RSS, but didn't work. I > > > didn't recieve that output buffer already started at XYZ. The only > > > error that I am getting is "Invalid XML Declaration - Line: 1 > > > Character: 6". I also tried putting header command in controller > > > class, but that also didn't work. :-(
> > > This is frustrating :-( > > > isn't there any magic command that will automatically remove all the > > > trailing and leading spaces ?
> > > Regards, > > > Ritesh
> > > On Nov 6, 10:07 am, AD7six <andydawso...@gmail.com> wrote:
> > > > On Nov 6, 2:01 pm, bingo <ragra...@gmail.com> wrote:
> > > > > hi all,
> > > > > I tried what Jon suggested. But still getting space before my xml > > > > > declaration :-( ...this is killing me...isn't there a good way to > > > > > debug this problem. Searching on the forum, I have realized that many > > > > > people struggle with this.
> > > > "you could try issuing a header as the first line of your layout and > > > > see where it complains output already > > > > started. "
> > > > there are many threads because it's a common problem (or a common > > > > mistake).
BOMS, mean UTF-8 without BOM (byte order marker), this used under windows to mark UTF-8 files (also UCS-2 etc...). Use an hexadecimal editor and you will notice the 3 bytes marking the UTF-8 at the beginning .. Do not know if it's your problem, but quite classical under windows. You can editor such as Notepad++ to check you file in hexa. Hope this helps
On Nov 7, 12:14 am, seacloud9 <brendonsm...@seacloud9.org> wrote:
> I don't know in eclipse my guess is it would be associated with your > overall preferences listed under encoding (google that) but you most > likely have space before and after your "<?php" .... "?>" but do > check your model view controllers all of them. It is a drag and it > did take me several days to do this myself but it was worth it.
> On Nov 6, 3:52 pm, bingo <ragra...@gmail.com> wrote:
> > hi Seacloud9
> > I am not sure if I understand what do you mean by UTF-8 "BOMS". How > > can verify that. I am using eclipse as my PHP Editor.
> > Regards, > > Ritesh
> > On Nov 6, 4:00 pm, seacloud9 <brendonsm...@seacloud9.org> wrote:
> > > I have had this exact same problem it can hold you up for days..
> > > Make sure you are using UTF-8 "BOMS".
> > > Make sure tags in Model, Controller, and Views "<? > > > php"............................ "?>" > > > Have no spaces after or before them NONE. I found one in the cake > > > folder in the app model. You have six spaces this is literally the > > > cause of your frustrations. You should check every model, view, and > > > controller.. It does suck but it is what is causing your problem.
> > > On Nov 6, 1:54 pm, bingo <ragra...@gmail.com> wrote:
> > > > hi AD7six,
> > > > I tried putting header in default layout for RSS, but didn't work. I > > > > didn't recieve that output buffer already started at XYZ. The only > > > > error that I am getting is "Invalid XML Declaration - Line: 1 > > > > Character: 6". I also tried putting header command in controller > > > > class, but that also didn't work. :-(
> > > > This is frustrating :-( > > > > isn't there any magic command that will automatically remove all the > > > > trailing and leading spaces ?
> > > > Regards, > > > > Ritesh
> > > > On Nov 6, 10:07 am, AD7six <andydawso...@gmail.com> wrote:
> > > > > On Nov 6, 2:01 pm, bingo <ragra...@gmail.com> wrote:
> > > > > > hi all,
> > > > > > I tried what Jon suggested. But still getting space before my xml > > > > > > declaration :-( ...this is killing me...isn't there a good way to > > > > > > debug this problem. Searching on the forum, I have realized that many > > > > > > people struggle with this.
> > > > > "you could try issuing a header as the first line of your layout and > > > > > see where it complains output already > > > > > started. "
> > > > > there are many threads because it's a common problem (or a common > > > > > mistake).
Thanks to all. Finally I was able to get rid of all my spaces. As many of you expected, there were many leading and trailing spaces in my code and once I removed all of them, everything worked like a charm. The good news for other is that I wrote a small script that will identify any trailing or leading spaces or new line in your PHP code and will inform you about that file. Below is the script that does this. Just provide the source location ($sourcepath) of your cakephp application and it will recursively go through each file, checking if there is any leading or trailing blank spaces.
<?php /*********************** *@author: Ritesh Agrawal *@description: Identifies php files that contain leading or trailing spaces before or after PHP opening or closings tags ***********************/ //Set Source Path $sourcepath = "D:/xampp/xampp/htdocs/memento";
//Regex Express to test leading and trailing spaces define("PRE", "#^[\n\r|\n\r|\n|\r|\s]+<\?php#"); define("POST", "#\?>[\n\r|\n\r|\n|\r|\s]+$#");
//Clear the file Status Cache clearstatcache();
//============ Code borrowed from php.net =============== // Replace \ by / and remove the final / if any $root = ereg_replace( "/$", "", ereg_replace( "[\\]", "/", $sourcepath )); // Touch all the files from the $root directory if( false === m_walk_dir( $root, "check", true )) { echo "'{$root}' is not a valid directory\n";
> BOMS, mean UTF-8 without BOM (byte order marker), this used under > windows to mark UTF-8 files (also UCS-2 etc...). Use an hexadecimal > editor and you will notice the 3 bytes marking the UTF-8 at the > beginning .. > Do not know if it's your problem, but quite classical under windows. > You can editor such as Notepad++ to check you file in hexa. > Hope this helps
> On Nov 7, 12:14 am, seacloud9 <brendonsm...@seacloud9.org> wrote:
> > I don't know in eclipse my guess is it would be associated with your > > overall preferences listed under encoding (google that) but you most > > likely have space before and after your "<?php" .... "?>" but do > > check your model view controllers all of them. It is a drag and it > > did take me several days to do this myself but it was worth it.
> > On Nov 6, 3:52 pm, bingo <ragra...@gmail.com> wrote:
> > > hi Seacloud9
> > > I am not sure if I understand what do you mean by UTF-8 "BOMS". How > > > can verify that. I am using eclipse as my PHP Editor.
> > > Regards, > > > Ritesh
> > > On Nov 6, 4:00 pm, seacloud9 <brendonsm...@seacloud9.org> wrote:
> > > > I have had this exact same problem it can hold you up for days..
> > > > Make sure you are using UTF-8 "BOMS".
> > > > Make sure tags in Model, Controller, and Views "<? > > > > php"............................ "?>" > > > > Have no spaces after or before them NONE. I found one in the cake > > > > folder in the app model. You have six spaces this is literally the > > > > cause of your frustrations. You should check every model, view, and > > > > controller.. It does suck but it is what is causing your problem.
> > > > On Nov 6, 1:54 pm, bingo <ragra...@gmail.com> wrote:
> > > > > hi AD7six,
> > > > > I tried putting header in default layout for RSS, but didn't work. I > > > > > didn't recieve that output buffer already started at XYZ. The only > > > > > error that I am getting is "Invalid XML Declaration - Line: 1 > > > > > Character: 6". I also tried putting header command in controller > > > > > class, but that also didn't work. :-(
> > > > > This is frustrating :-( > > > > > isn't there any magic command that will automatically remove all the > > > > > trailing and leading spaces ?
> > > > > Regards, > > > > > Ritesh
> > > > > On Nov 6, 10:07 am, AD7six <andydawso...@gmail.com> wrote:
> > > > > > On Nov 6, 2:01 pm, bingo <ragra...@gmail.com> wrote:
> > > > > > > hi all,
> > > > > > > I tried what Jon suggested. But still getting space before my xml > > > > > > > declaration :-( ...this is killing me...isn't there a good way to > > > > > > > debug this problem. Searching on the forum, I have realized that many > > > > > > > people struggle with this.
> > > > > > "you could try issuing a header as the first line of your layout and > > > > > > see where it complains output already > > > > > > started. "
> > > > > > there are many threads because it's a common problem (or a common > > > > > > mistake).
> Thanks to all. Finally I was able to get rid of all my spaces. As many > of you expected, there were many leading and trailing spaces in my > code and once I removed all of them, everything worked like a charm. > The good news for other is that I wrote a small script that will > identify any trailing or leading spaces or new line in your PHP code > and will inform you about that file. Below is the script that does > this. Just provide the source location ($sourcepath) of your cakephp > application and it will recursively go through each file, checking if > there is any leading or trailing blank spaces.
> <?php > /*********************** > *@author: Ritesh Agrawal > *@description: Identifies php files that contain leading or trailing > spaces before or after PHP opening or closings tags > ***********************/ > //Set Source Path > $sourcepath = "D:/xampp/xampp/htdocs/memento";
> //Regex Express to test leading and trailing spaces > define("PRE", "#^[\n\r|\n\r|\n|\r|\s]+<\?php#"); > define("POST", "#\?>[\n\r|\n\r|\n|\r|\s]+$#");
> //Clear the file Status Cache > clearstatcache();
> //============ Code borrowed from php.net =============== > // Replace \ by / and remove the final / if any > $root = ereg_replace( "/$", "", ereg_replace( "[\\]", "/", > $sourcepath )); > // Touch all the files from the $root directory > if( false === m_walk_dir( $root, "check", true )) { > echo "'{$root}' is not a valid directory\n";
> //If file, checks whether there is any leading spaces before opening > PHP tag or > // trailing spaces after closing PHP tag > function check( $path ) {
> On Nov 6, 6:21 pm, francky06l <franckl...@gmail.com> wrote:
> > BOMS, mean UTF-8 without BOM (byte order marker), this used under > > windows to mark UTF-8 files (also UCS-2 etc...). Use an hexadecimal > > editor and you will notice the 3 bytes marking the UTF-8 at the > > beginning .. > > Do not know if it's your problem, but quite classical under windows. > > You can editor such as Notepad++ to check you file in hexa. > > Hope this helps
> > On Nov 7, 12:14 am, seacloud9 <brendonsm...@seacloud9.org> wrote:
> > > I don't know in eclipse my guess is it would be associated with your > > > overall preferences listed under encoding (google that) but you most > > > likely have space before and after your "<?php" .... "?>" but do > > > check your model view controllers all of them. It is a drag and it > > > did take me several days to do this myself but it was worth it.
> > > On Nov 6, 3:52 pm, bingo <ragra...@gmail.com> wrote:
> > > > hi Seacloud9
> > > > I am not sure if I understand what do you mean by UTF-8 "BOMS". How > > > > can verify that. I am using eclipse as my PHP Editor.
> > > > Regards, > > > > Ritesh
> > > > On Nov 6, 4:00 pm, seacloud9 <brendonsm...@seacloud9.org> wrote:
> > > > > I have had this exact same problem it can hold you up for days..
> > > > > Make sure you are using UTF-8 "BOMS".
> > > > > Make sure tags in Model, Controller, and Views "<? > > > > > php"............................ "?>" > > > > > Have no spaces after or before them NONE. I found one in the cake > > > > > folder in the app model. You have six spaces this is literally the > > > > > cause of your frustrations. You should check every model, view, and > > > > > controller.. It does suck but it is what is causing your problem.
> > > > > On Nov 6, 1:54 pm, bingo <ragra...@gmail.com> wrote:
> > > > > > hi AD7six,
> > > > > > I tried putting header in default layout for RSS, but didn't work. I > > > > > > didn't recieve that output buffer already started at XYZ. The only > > > > > > error that I am getting is "Invalid XML Declaration - Line: 1 > > > > > > Character: 6". I also tried putting header command in controller > > > > > > class, but that also didn't work. :-(
> > > > > > This is frustrating :-( > > > > > > isn't there any magic command that will automatically remove all the > > > > > > trailing and leading spaces ?
> > > > > > Regards, > > > > > > Ritesh
> > > > > > On Nov 6, 10:07 am, AD7six <andydawso...@gmail.com> wrote:
> > > > > > > On Nov 6, 2:01 pm, bingo <ragra...@gmail.com> wrote:
> > > > > > > > hi all,
> > > > > > > > I tried what Jon suggested. But still getting space before my xml > > > > > > > > declaration :-( ...this is killing me...isn't there a good way to > > > > > > > > debug this problem. Searching on the forum, I have realized that many > > > > > > > > people struggle with this.
> > > > > > > "you could try issuing a header as the first line of your layout and > > > > > > > see where it complains output already > > > > > > > started. "
> > > > > > > there are many threads because it's a common problem (or a common > > > > > > > mistake).
> > > > > > > You'll find it in the end ;).
> > > > > > > AD- Hide quoted text -
> > > > > - Show quoted text -- Hide quoted text -
So as a side note this would also be useful for all the people that have problems with jpGraph, imagemagik, using gd to make images and such as these issues can trip you up there as well
Sam D
-- (the old fart) the advice is free, the lack of crankiness will cost you
- its a fine line between a real question and an idiot
> So as a side note this would also be useful for all the people that > have problems with jpGraph, imagemagik, using gd to make images and > such as these issues can trip you up there as well
> Sam D
> -- > (the old fart) the advice is free, the lack of crankiness will cost you
> - its a fine line between a real question and an idiot
Another useful tip to cut down on these kind of errors in future is: The closing php tag '?>' is optional so if you omit it you will never have any unwanted trailing spaces ;-)
> Another useful tip to cut down on these kind of errors in future is: > The closing php tag '?>' is optional so if you omit it you will never > have any unwanted trailing spaces ;-)
Skipping the ?> is actually something the Zend Framework people require if you submit code to them - it's in their coding style guide. Seems to work, but I couldn't get the habit - I hated not having balanced elements!
On Nov 7, 11:21 am, bingo <ragra...@gmail.com> wrote:
> On Nov 7, 5:26 am, RichardAtHome <richardath...@gmail.com> wrote:
> > Another useful tip to cut down on these kind of errors in future is: > > The closing php tag '?>' is optional so if you omit it you will never > > have any unwanted trailing spaces ;-)