|
Posted by Nullcode on 05/16/05 03:58
Oli Filth wrote:
> Nullcode wrote:
>
>> This is doing my fucking head in, what am I doing wrong, this outputs
>> NOTHING:
>>
>> index.php has
>> <link rel="alternate" type="application/rss+xml" href="rss.php"
>> title="News RSS" />
>>
>> Then I want to generate my rss feed on th fly:
>>
>> <?xml version="1.0" encoding="ISO-8859-1" ?>
>> <rss version="2.0">
>> <channel>
>> <title>Site News</title>
>> <link>http://www.domain.com</link>
>> <description>News Headlines</description>
>>
>>
>> <?php
>>
>> include("includes/dbdata.php");
>>
>> $connect = mysql_connect($db_host,$db_user,$db_pass) or
>> die(mysql_error());
>> $select = mysql_select_db($db_name,$connect) or die(mysql_error());
>> $query = "SELECT * FROM news ORDER BY id DESC LIMIT 0,10";
>> $result = mysql_query($query,$connect);
>>
>> while($news = mysql_fetch_array($result)) {
>>
>> echo "<item>\n";
>> echo "<title>" .$news['title'] ."</title>\n";
>> echo "<link>http://www.link.com</link>\n";
>> echo "<description>" .$news['news'] ."</description>\n";
>> echo "</item>\n\n";
>>
>> }
>>
>>
>> ?>
>>
>> </channel>
>> </rss>
>>
>
> When you say it "outputs nothing", do you mean literally nothing, not
> even the bit before the PHP code? Do you have display_errors turned on
> in your php.ini file?
>
>
yep, literally nothing. The php on its own will output the database
data, but even if I echo each line of xml it still fails to output a
single thing. Ive tried with error_reporting(E_ALL) ... nothing :(
--
Nullcode
"Suffering is a result of desire"
bnVsbGNvZGVAbnVsbGNvZGUuY29t
www.hidemyemail.net
Navigation:
[Reply to this message]
|