buonpomeriggio a tutti volevo sapere se qualcuno è così gentile da spiegarmi dove sbaglio.
ho creato questo piccolo scriptino per fare l'output dei dati da un db mysql in un file xml.
l'errore che mi viene continuamente restiuito èCodice PHP:<?php
header("Content-type: application/xml");
header("Cache-control: no-cache, must-revalidate");
echo "<?xml version=\"1.0\"?>\n";
echo"<images>";
echo"<thumb displayNum=\"6\" separation=\"5\">";
include "../datidb.inc";
$path ="/gallery_c/images/";
$conn="";
$select="";
$conn=mysql_connect($dbhost,$dblogin,$dbpasswd);
$select=mysql_select_db($dbname);
$query="SELECT * FROM foto ORDER BY id DESC";
$select=mysql_query($query,$conn) or die($query);
while($records=mysql_fetch_array($select)){
$foto=$records['foto'];
$desc=$records['desc'];
echo"
<image>$path$foto</image>
<description>$desc</description>
</thumb>
</images>";
}
mysql_free_result($select);
?>
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Nei documenti XML è consentito un solo elemento di primo livello. Errore durante l'elaborazione della risorsa "http://www.a...
<image>/gallery_c/images/foto2.jpg</image>
-----------------^
grazie a tutti anticipatamente

Rispondi quotando