RSS Feed - Header Problem |
[eluser]Voovu[/eluser]
Hello, i hope this forum is correct to post my problem. i'm trying to build a rss feed and use this tutorial: http://net.tutsplus.com/tutorials/php/bu...deigniter/ the problem is this: Code: header("Content-Type: application/rss+xml"); Code: $this->output->set_header("Content-Type: application/rss+xml"); can someone help me with this issue? regards
[eluser]elambiguo[/eluser]
This is my controller.... Code: class Feed extends Controller And works perfectly.... And this...... Code: <?php Is part of the view code.... I hope this help....
[eluser]attos[/eluser]
Try the following in your view: Code: echo '<?xml version="1.0" encoding="utf-8" \x3F>'."\n"; Notice how the XML tag is closed (\x3F> versus ?>
[eluser]Voovu[/eluser]
That also dont work ... the problem is still the same the type of header will not change it's text/html ... Code: header("Content-Type: application/xhtml+xml"); nothing work's, sometimes the page will show nothing and sometimes: Quote:http://domain.com/feed What my site is about comes here en-en [email protected] Copyright 2009i use exact script and db that shows in the tut, i also note that i must load the database etc ... what can i do ?
[eluser]Voovu[/eluser]
well ok, now it works - thread can be closed - thanks!
[eluser]elambiguo[/eluser]
[quote author="Voovu" date="1260302601"]well ok, now it works - thread can be closed - thanks![/quote] Please... Post the solution (if it is posible)... useful for anyone that this thread reads.
[eluser]Voovu[/eluser]
[quote author="elambiguo" date="1260370720"] Please... Post the solution (if it is posible)... useful for anyone that this thread reads.[/quote] ok sorry well i have done this: Code: header("Content-Type: text/xml"); Code: /* End of file feed.php */ Code: ?>
[eluser]elambiguo[/eluser]
Thanks.... sometimes the minor bug is a great solution.... XD
[eluser]Unknown[/eluser]
I spent all day trying to figure out why my feed was not displaying properly. Then I read this thread. THANKS BTW, I had a "?>" at the end of my controller file. Removed that and it works. Both "application/rss+xml" and "text/xml" content types work for me. |
Welcome Guest, Not a member yet? Register Sign In |