In windows, by using wamp just i have written following code . But its working
<?php
echo "Hai1";
$xsl = new DomDocument();
echo "Hai2";
$xml = new DomDocument();
$xsl->load("samplecom.xsl");
$xml->load("summaryview.xml");
$proc = new XsltProcessor();
$proc->registerPhpFunctions();
// Load the documents and process using $xslt
$xsl = $proc->importStylesheet($xsl);
// transform and output the xml document
$newdom = $proc->transformToDoc($xml);
echo "Hai";
print $newdom->saveXML();
?>
If i try the same code in linux means it display following error message
Hai1
Fatal error: Cannot instantiate non-existent class: domdocument in /foaf/sample/sample2.php on line 3
It doesn't execute Hai2 itself.
How to rectify this error please help me