Qualcuno puo aiutarmi con questo codice, sto tentando di creare il mio sito, questa è la index, quando la lancio in easyphp mi da un errore. Riporto prima il codice e poi l'errore:
CODICE
<?php
include_once 'common.inc.php';
//$fileDir è una variabile presente in common.inc.php che rappresenta
//la radice di dove ho i file xml del sito e che riuso in quasi tutti i file.php
/quindi ho preferito metterla in un file da includere
$file = $fileDir.'homepage.xml';
$doc = new DOMDocument();
$doc->preserveWhiteSpace = false;
$doc->load($file);
$root_homepage = $doc->documentElement;
$headline_homepage = $root_homepage->getElementsByTagName('headline');
$description_homepage = $root_homepage->getElementsByTagName('description');
$body_homepage = $root_homepage->getElementsByTagName('body');
?>
<DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN"
"""""""http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<?php
echo htmlentities($headline_homepage->nodeValue);
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="\css\xmlcms.css" type="text/css" />
</head>
<body>
<?php
include 'navtop.inc.php';
?>
<div id="navSide">
<?php
include 'search.inc.php';
include 'news.inc.php';
echo 'Mappa del sito';
?>
</div>
<div id="mainContent">
<?php
echo '<h1>' . htmlentities($headline_homepage->nodeValue).'</h1>';
echo '
' . htmlentities($description_homePage->nodeValue). '</p>';
echo $body_homePage->nodeValue;
?>
</div>
</body>
</html>
ERRORE alla riga 4:
Fatal error: Cannot instantiate non-existent class: domdocument in c:\programmi\easyphp1-8\www\nuova cartella\copia di lucacolleoni\index.php on line 4
COME POSSO RISOLVERLO??????