![]() |
My RSS feed is being interpreted as download? - 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: My RSS feed is being interpreted as download? (/showthread.php?tid=8029) |
My RSS feed is being interpreted as download? - El Forum - 05-01-2008 [eluser]taewoo[/eluser] Hi all. I followed Derek's tutorial on how to create RSS feed with CI. With my feed, i try to load it in the browser, the browser asks me to download.. Is this a header issue? (By the way... browser screenshot attached) Controller: Code: $data['encoding'] = 'utf-8'; View Code: <?php echo '<?xml version="1.0" encoding="utf-8"?>'; ?> My RSS feed is being interpreted as download? - El Forum - 05-02-2008 [eluser]benofsky[/eluser] Hi, try this for the header instead: Code: header("Content-Type: application/xml"); Since as far as I know application/rss+xml doesn't exist (from my research). Good luck My RSS feed is being interpreted as download? - El Forum - 05-04-2008 [eluser]taewoo[/eluser] Thans Ben... But now I get this error (from FireFox .... IE just doesnt't display at all) Code: XML Parsing Error: xml declaration not at start of external entity My RSS feed is being interpreted as download? - El Forum - 05-15-2008 [eluser]taewoo[/eluser] Ok I think I got it. Spaces. Damn spaces in the controller causing all sorts of weird behavior. My RSS feed is being interpreted as download? - El Forum - 08-08-2008 [eluser]alectrash[/eluser] My solution is to get rid of the xml declaration at start of the doc here Code: <?xml version='1.0' ?> Code: header('Content-Type: text/xml; charset=utf-8'); The feed will still validate according to www.feedvalidator.org and validator.w3.org. Problem solved? My RSS feed is being interpreted as download? - El Forum - 08-08-2008 [eluser]taewoo[/eluser] hey alectrash It was space issue. For some reason if you have spaces outside of XML tags, it causes this problem... My RSS feed is being interpreted as download? - El Forum - 08-08-2008 [eluser]alectrash[/eluser] Sorry it is a space issue correct, yes. I was just simply pointing out that removing the xml declaration solves the problem. Have you found a way to solve the problem and keep the xml declaration by any chance. If so could you specify. Would be very much appreciated. My RSS feed is being interpreted as download? - El Forum - 08-08-2008 [eluser]taewoo[/eluser] this works for me Code: <?php My RSS feed is being interpreted as download? - El Forum - 08-09-2008 [eluser]alectrash[/eluser] That :-) excellent thanks taewoo. |