分享

PHP5中使用XSLT扩展

 昵称597197 2012-05-04
PHP5中使用XSLT扩展
2007年10月02日 星期二 17:51

如果你在php5中用xslt_create()这个php4中的方法时,将会得到call    to    undefined    function    xslt_create()这个error。

reason is : 该扩展已经从    PHP    5    中移出,然后移入到    PECL    仓库中。 php5的ext目录下已经没有php_xslt.dll了,取而代之的是php_xsl.dll。

the sample below shows how to use php_xsl.dll in php5

   <?php   
   /*    Load    the    two    XML    sources    */   
   $xml    =    new    DomDocument;    //    from    /ext/dom   
   $xml->load('example.xml');   
    
   $xsl    =    new    DomDocument;   
   $xsl->load('example.xsl');   
    
   /*    Configure    the    transformer    */   
   $proc    =    new    xsltprocessor;   
   $proc->importStyleSheet($xsl);    //    attach    the    xsl    rules   
   echo    $proc->transformToXML($xml);    //    actual    transformation   
   ?>     
    
   详见   
  http://www./manual/en/ref.xsl.php

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多