I'm trying to transform a XML file to a HTML output with XSLT..
My code is as following:
<?php
$xml = new DOMDocument;
$xml->load('file.xml');
$xsl = new DOMDocument;
$xsl->load('file.xsl');
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl);
echo $proc->transformToXML($xml);
?>
But I'm getting the error: Fatal error: Class 'XSLTProcessor' not found
I know this has something to do with the fact dat the xsltprocessor is not compiled with PHP on my server... But I can't seem to find a way to enable it. (I do not control the server, but my hosting does)
Just install : sudo apt-get install php5-xsl
AND RESTART your APACHE Server ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With