Fehler bei RSS mit PHP und MySQL
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /opt/lampp/htdocs/intern/feed.xml on line 10
Hallo! Ich mal wieder. Ich hab wieder ein Problem mit dem folgenden PHP script. Weiß aber nicht was nicht funktioniert. In der .htaccess Datei hab ich den Header eingetragen.
Folgende Fehlermeldung kommt:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /opt/lampp/htdocs/intern/feed.xml on line 10
masterG
Folgende Fehlermeldung kommt:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /opt/lampp/htdocs/intern/feed.xml on line 10
<? header('Content-type: text/xml'); ?>
<rss version="2.0">
<channel>
<title>News im Insternbereich</title>
<description>Internbereich</description>
<link>http://192.168.0.3/intern/</link>
<copyright>masterG</copyright>
<?
mysql_connect("localhost","root",passwd");
mysql_select_db("cdcenter");
$q="SELECT id,autor,titel,text,UNIX_TIMESTAMP(datum) AS datum
FROM news LIMIT 0,15 ORDER BY datum DESC";
$doGet=mysql_query($q);
while($result = mysql_fetch_array($doGet)){
?>
<item>
<title> <?=htmlentities(strip_tags($result['titel'])); ?></title>
<description> <?=htmlentities(strip_tags($result['text'],'ENT_QUOTES'));?></description>
<link>http://192.168.0.3/intern/artikel?p=<?=$result['id'];?></link>
<pubDate> <?=strftime( "%a, %d %b %Y %T %Z" , $result['datum']); ?></pubDate>
</item>
<? } ?>
</channel>
</rss>
masterG
Please also mark the comments that contributed to the solution of the article
Content-Key: 61494
Url: https://administrator.de/contentid/61494
Printed on: April 20, 2024 at 03:04 o'clock
2 Comments
Latest comment