|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 | |
|
Member
Iscritto dal: Nov 2004
Città: Roma e Palermo
Messaggi: 204
|
[php] stampare a video dei dati XML
allora, volevo visualizzare un file xml che mi estrapolo da un db sql, ma ho qualche problema all'inizio:
Codice:
$tmp = ' <?xml version="1.0" ?>'; $xmlText = <<<EOT $tmp\n <catalogo titolo="Catalogo Vini"> loool EOT; echo(htmlentities($xmlText)); Quote:
|
|
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Mar 2006
Città: Bergamo
Messaggi: 2499
|
perchè l'output è di html, dovresti usare il tag <br/>.
forse vorresti usare la funzione header? header('Content-Type: text/xml');
__________________
ho concluso con: kvegeta, doctordb, Leland Gaunt.
|
|
|
|
|
|
#3 | ||
|
Member
Iscritto dal: Nov 2004
Città: Roma e Palermo
Messaggi: 204
|
Quote:
Codice:
$tmp = ' <?xml version="1.0" ?>';
$xmlText = <<<EOT
$tmp
<catalogo titolo="Catalogo Vini">
</catalogo>
EOT;
Header("Content-Type: text/xml; charset=utf-8;");
echo($xmlText);
Quote:
|
||
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Mar 2006
Città: Bergamo
Messaggi: 2499
|
c'è qualcosa che non va nel xml che stai generando
__________________
ho concluso con: kvegeta, doctordb, Leland Gaunt.
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 15:42.











ho concluso con: kvegeta, doctordb, Leland Gaunt.









