Truble, building RSS - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Truble, building RSS (/showthread.php?tid=3713) |
Truble, building RSS - El Forum - 10-18-2007 [eluser]iniweb[/eluser] This is my code: Code: class Rss extends Controller { if Rss.tpl have this content: Code: <?xml version="1.0" encoding="windows-1251"?> Show this error: Quote:Parse error: parse error, unexpected T_STRING in x:\home\igniter.by\www\system\application\views\Rss.tpl on line 1 How to correct? Truble, building RSS - El Forum - 10-18-2007 [eluser]mironcho[/eluser] Hi, change first line in Rss.tpl to: Code: <?php echo '<?xml version="1.0" encoding="windows-1251"?>' . "\n"; ?> And take a look at: http://www.derekallard.com/blog/post/building-an-rss-feed-in-code-igniter/ Truble, building RSS - El Forum - 10-18-2007 [eluser]nirbhab[/eluser] This is due to wrong RSS encoding, check this link: http://en.wikipedia.org/wiki/RSS <?php header('Content-Type: text/html; charset=utf-8', true); echo '<?xml version="1.0" encoding="utf-8"?'.'>'; echo '<rss version="2.0">'; //code/////// ?> Please check the above URL, it would surely help you out. Thankx for the URL dear |