⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xslt_setopt.phpt

📁 php-4.4.7学习linux时下载的源代码
💻 PHPT
字号:
--TEST--xslt_setopt function and public entities--SKIPIF--<?phpinclude("skipif.inc");if(!function_exists('xslt_setopt')) {	die("skip function xslt_setopt() is not available\n");}?>--INI--magic_quotes_runtime=0--FILE--<?phperror_reporting(E_ALL);$xmlfile = dirname(__FILE__).'/public.xml';$xslfile = dirname(__FILE__).'/args.xsl';$xh = xslt_create();// Tell Sablotron to process public entitiesxslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES);$result = xslt_process($xh, $xmlfile, $xslfile);print "$result\n";$xslstring = implode('', file($xslfile));$xslstring = str_replace('method="text"', 'method="html"', $xslstring);$xslstring = str_replace('<xsl:value-of select="." />', '<html><head><title>foo</title></head><body><p><xsl:value-of select="." /></p></body></html>', $xslstring);// DEBUG: print $xslstring;xslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES | XSLT_SABOPT_DISABLE_ADDING_META);var_dump(xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' => $xslstring)));xslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES);var_dump(xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' => $xslstring)));// DEBUG: print "$result_meta\n";xslt_free($xh);?>--EXPECT--PHP QA

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -