Class \"XSLTProcessor' not found [duplicate]
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question already has an answer here: Fatal error: Class 'XSLTProcessor' not found 2 answers 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