http://xiaocon.51.net/tree/tree.htm 或 http://xiaocon.51.net/tree/navi.xml " target=_blank> http://xiaocon.51."/> http://xiaocon.51.net/tree/tree.htm 或 http://xiaocon.51.net/tree/navi.xml " target=_blank> http://xiaocon.51.">
ホームページ >バックエンド開発 >PHPチュートリアル >我也贴一个,用的时候只要配制好xml文件就行了,连程序都不用改_PHP
使用时需要加载XSLT模块,程序下载地址:http://xiaocon.51.net/tree/tree.zip
演示地址:
http://xiaocon.51.net/tree/tree.htm
" target=_blank>
http://xiaocon.51.net/tree/tree.htm
或
http://xiaocon.51.net/tree/navi.xml
" target=_blank>
http://xiaocon.51.net/tree/navi.xml
51.net上不支持xslt :(
程序文件:
===========================================================
$xslstring = implode(',file("navigator.xsl"));
$xmlstring = implode(',file("navi.xml"));
$arguments = array(
'/_xml' => $xmlstring,
'/_xsl' => $xslstring
);
$xh = xslt_create();
$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments);
if ($result) {
print $result;
}
else {
print "Err";
}
xslt_free($xh);
?>
xml文件
===========================================================
XSLT文件
============================================================