当前位置: 首页 > 图文教程 > 网络编程 > PHP > 使用php+xslt在windows平台上

PHP
使用无限生命期Session的方法
php+oracle 分页类
用PHP读取IMAP邮件
一段php加密解密的代码
基于qmail的完整WEBMAIL解决方案安装详解
用PHP发电子邮件
PHP网站提速三大“软”招
在线短消息收发的程序,不用数据库
PHP的开合式多级菜单程序
PHP的栏目导航程序
PHP系统流量分析的程序
用php写的serv-u的web申请账号的程序
php中的时间处理
在线竞拍系统的PHP实现框架(二)
用文本作数据处理
PHP 和 MySQL 基础教程(一)
浅谈PHP语法(1)
无数据库的详细域名查询程序PHP版(3)
域名查询代码公布
最省空间的计数器

PHP 中的 使用php+xslt在windows平台上


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 76 ::
收藏到网摘: n/a

在windows平台上使用php+xslt
1。到http://www.php.net下载php 4.0.6
2。将php-4.0.6-Win32.zip解压到c:\php下
3。在web server上配置好php
3。拷贝dlls目录下的下列四个文件到windows\system(32)下
expat.dll
sablot.dll
xmlparser.dll
xmltok.dll
4。修改php.ini
修改extension_dir指向正确的extension目录
extension_dir = c:/php/extensions
然后找到下面这行
;extension=php_sablot.dll
修改为:
extension=php_sablot.dll
如果php配置的是cgi模式,则不需要重启web server,否则可能需要重启web server
5。我们用例子来测试一下
test.xml
============================
<?xml version="1.0"?>
<articles>
<article>
This is the first article.
</article>
</articles>
test.xsl
============================
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<xsl:value-of select="articles/article"/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
test.php
===========================
<?php
$parser=xslt_create();
xslt_run($parser,'test.xsl','test.xml');
print xslt_fetch_result($parser);
xslt_free($parser);
?>

最后,该parser不支持GB2312。:(