Я хотел напечатать XML-файл, как в гнездовой список HTML с использованием XSLT, и насколько я знаю, что код правильный, однако я получаю эту ошибкуКак включить функции XSLT в PHP 5?
Fatal error: Call to undefined function xslt_create()
Что я полагаю, означает, Функции xslt havn't не включены. Как включить эти функции в PHP? Есть ли файл php, который мне нужно включить (например, как работают библиотеки Javascript), или это что-то более сложное? Я принимаю участие в MediaTemple.
Вот код PHP Я использую:
<?php
// Allocate a new XSLT processor
$xh = xslt_create();
// Process the document, returning the result into the $result variable
$result = xslt_process($xh, 'armstrong.xml', 'familyToNestedList.xsl');
if ($result) {
print "SUCCESS, sample.xml was transformed by sample.xsl into the \$result";
print " variable, the \$result variable has the following contents\n<br>\n";
print "<pre>\n";
print $result;
print "</pre>\n";
}
else {
print "Sorry, sample.xml could not be transformed by sample.xsl into";
print " the \$result variable the reason is that " . xslt_error($xh) .
print " and the error code is " . xslt_errno($xh);
}
xslt_free($xh);
?>
Заранее спасибо!
http://www.php.net/manual/en/xslt.installation.php – DampeS8N 2010-12-15 14:43:55