RSS FEED from derekallard.com Problem at server |
[eluser]Asinox[/eluser]
Hi, i tried the RSS Feed of Derekallard.com, and in my local machine the feed is fine, but in my server i got the error: Code: A PHP Error was encountered Now the controller Feed: Code: if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Somebody know why? Thanks for see.
[eluser]TheFuzzy0ne[/eluser]
That's usually a sign that you have a space before an opening PHP tab, or after a closing one. Also, be sure you're not echoing something. I assume you're code has PHP tags (as I don't see any above). If so, you can omit the closing PHP tag completely.
[eluser]Asinox[/eluser]
yes, that was true... space before Code: if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Thanks
[eluser]Asinox[/eluser]
but know i have another problem with the view Google Crhome said: Code: error on line 1 at column 35: parsing XML declaration: '?>' expected Code: <?php Where is the problem
[eluser]TheFuzzy0ne[/eluser]
Try adding a space before the closing tag: Code: <?php
[eluser]Asinox[/eluser]
[quote author="TheFuzzy0ne" date="1237317255"]Try adding a space before the closing tag: Code: <?php Thanks, but is not working, the same thing
[eluser]Asinox[/eluser]
fixed: Code: echo '<?xml version="1.0" encoding="utf-8" '. "?" .'>' . "\n";
[eluser]Asinox[/eluser]
now i have another problem with this line Code: <pubDate><?php echo date('r', $entry->date);?></pubDate> Code: <pubDate><div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;"> Why use "r"???? the date field in my table is like 2009-03-10 12:10:04, why the error?, the "r" is optional? thanks
[eluser]attos[/eluser]
You can use the predefined DATE_RSS or DATE_ATOM constants instead of 'r' in your view: Code: <pubDate><?php echo date(DATE_RSS, $entry->date);?></pubDate> (From the PHP Manual)
[eluser]Asinox[/eluser]
Thanks attos but the same error again Code: <pubDate><div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;"> |
Welcome Guest, Not a member yet? Register Sign In |