1/ I used PHP 4.3.0.
--> couldn't load the extension php_domxml.dll and xstl extensions.
I found somewhere in the Zend site that 4.3.0 just can't load the XML extension
So I installed php 4.2.0
2/ Using PHP 4.2.0
I have that uncommented only in the extensions.
extension=php_domxml.dll
extension=php_xslt.dll
I'm under windows (and my server is apache). Everything is local.
My code is :
Code: Select all
<?php
// store XML and XSL content as variables
$xmlstring = join('', file('page.xml'));
$xslstring = join('', file('fod.xsl'));
// call the XSLT processor directly
xslt_process($xslstring, $xmlstring, $result);
// output the result
echo $result;
?>Fatal error: Call to undefined function: xslt_process() in D:\Dev\htdocs\xmltest.php on line 8
I tried using xslt_create and it does (as I expected it) the same.
Code: Select all
// the files
$xmlfile = "page.xml";
$xslfile = "fod.xsl";
// create the XSLT processor
$xslthandler = xslt_create() or die("No XSLT handler available.");
// process the two files to get the desired output
xslt_run($xslthandler, $xslfile, $xmlfile);
// get and print the result
echo xslt_fetch_result($xslthandler);
// free the resources occupied by the handlers
xslt_free($xslthandler);
?>If I understood right Sablotron or whatever should be integrated with PHP 4 and over.
Can I have guidelines as where I missed something ? ty.
PS : I don't think it's the extension php.ini parameter which fails, because I have 'can't find extension blabla.dll' if I modify the extension_dir to a wrong one, for example.
thank you in advance.