Extra semicolon (RSS Feed) |
[eluser]xmonader[/eluser]
Hi, I'm trying to build some RSS Feed http://www.derekallard.com/blog/post/bui...e-igniter/ rss.php Code: <?php echo '<?xml version="1.0" encoding="UTF-8"?>'?> Code: <?xml version="1.0" encoding="UTF-8"; ?>
[eluser]pickupman[/eluser]
I don't know if it's a typo on the board but shouldn't the first line be changed from: Code: <?php echo '<?xml version="1.0" encoding="UTF-8"?>'?>
[eluser]xmonader[/eluser]
pickupman: Yes the first line is Code: <?php echo '<?xml version="1.0" encoding="UTF-8"?>';?> Even if i replace it with Code: <?xml version="1.0" encoding="UTF-8"?> Code: <?xml version="1.0" encoding="UTF-8"; ?>
[eluser]xmonader[/eluser]
Got it fixed --short tags problem here's the simple way Code: <?= '<' . '?xml version="1.0" encoding="utf-8"?' . '>' ?>
[eluser]xmonader[/eluser]
After checking a few applications updated to CI 2 I found that all feeds are broken! and none of the snippets above are working. The only working thing is Code: //FIX ME.
[eluser]pickupman[/eluser]
You don't echo the header(). I put this as the first line of the controller's method: Code: header("Content-Type: application/rss+xml"); Here his the first line of my view: Code: <?php
[eluser]xmonader[/eluser]
Thanks, but still doesn't work Code: function index() { the RSS view Code: <?php Hmmm..?
[eluser]InsiteFX[/eluser]
You still have a short tag here! Code: <?= str_replace('/img/post_resources/', base_url() InsiteFX
[eluser]xmonader[/eluser]
still not working :S Code: <?xml version="1.0" encoding="utf-8"; ?>
[eluser]pickupman[/eluser]
Just out of curiosity, do you have rewrite short tags set to true at the near bottom of your application/config.php file? What happens when you try again: Code: <?php echo '<?xml version="1.0" encoding="utf-8"?' . '?>' . "\n"; ?> |
Welcome Guest, Not a member yet? Register Sign In |