Dynamically generated XML File Doesn't work on Server but works well on localhost

Fell

New Member
I generated a XML file in php. This file generates a xml output perfectly in my localhost and at the same time when I uploaded it to my server it fails.
Error Screen
VuYDs.jpg
Here is the code.\[code\]<?php include_once("database/db.php"); $sqlNews = "SELECT * FROM news"; $runSqlNews = mysql_query($sqlNews); while ($rowSqlNews = mysql_fetch_array($runSqlNews)) $arrSqlNews[] = $rowSqlNews; header('Content-type: text/xml'); header('Pragma: public'); header('Cache-control: private'); header('Expires: -1'); echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; echo '<xml>'; for($i=0;$i<count($arrSqlNews);$i++) { echo "<news>"; echo "<newsId>".$arrSqlNews[$i][id]."</newsId>"; echo "<newsAuthor>".$arrSqlNews[$i][news_author]."</newsAuthor>"; echo "<description>".$arrSqlNews[$i][news_description]."</description>"; echo "<newsText> <![CDATA[".$arrSqlNews[$i][news_text]. "]]></newsText>"; echo "<plainNewsDescription>".$arrSqlNews[$i][plain_news_description]."</plainNewsDescription>"; echo "<plainNewsTitle>".$arrSqlNews[$i][plain_news_title]."</plainNewsTitle>"; echo "<newsUrl> <![CDATA[". $arrSqlNews[$i][news_url]. "]]></newsUrl>"; echo "<newsCategory> <![CDATA[". $arrSqlNews[$i][category]. "]]></newsCategory>"; echo "<image>http://metroplots.com/images/members/".$arrSqlNews[$i][news_image]."</image>"; echo "<createdOn>".$arrSqlNews[$i][created_on]."</createdOn>"; echo "</news>"; } echo '</xml>';?>\[/code\]Please let me know where I went wrong. Thanks in Advance !!!
 
Back
Top