Ragazzi.....,
Perchè quando creo un documeto xhtml compatibile come questo:
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include("functionSvil.php");
include("Dvd.php");
/*CARICA XML CATALOGO DVD*/
$fXmlin = new DOMDocument('1.0', 'iso-8859-1');
$fXmlin->async = false;
$fXmlin->load('dvd.xml');
?>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
$dvds = $fXmlin->getElementsByTagName( "dvd" );
foreach( $dvds as $dvd )
{
$titoli = $dvd->getElementsByTagName( "titolo" );
$titolo = $titoli->item(0)->nodeValue;
$registi = $dvd->getElementsByTagName( "regista" );
$regista = $registi->item(0)->nodeValue;
echo "$titolo - $regista \n";
}
?>
</body>
</html>
ricevo questo errore ?
Parse error: syntax error, unexpected T_STRING in C:\Programmi\Apache Group\Apache2\Web\DVDrent\viewCatalogo.php on line 1
Mentre se sostituisco queste righe va tutto bene?
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Con le classiche righe
<html>
<head>
grazie :berto: