首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

XSLTProcessor::setProfiling

(PHP >= 5.3.0)

XSLTProcessor :: setProfiling - 设置分析输出文件

描述

代码语言:javascript
复制
bool XSLTProcessor::setProfiling ( string $filename )

设置文件以在处理样式表时输出分析信息。

参数

filename

转储配置文件信息的文件路径。

返回值

TRUE成功或FALSE失败时返回。

示例

示例#1示例分析输出

代码语言:javascript
复制
<?php
//?Load?the?XML?source
$xml?=?new?DOMDocument;
$xml->load('collection.xml');

$xsl?=?new?DOMDocument;
$xsl->load('collection.xsl');

//?Configure?the?transformer
$proc?=?new?XSLTProcessor;
$proc->setProfiling('profiling.txt');
$proc->importStyleSheet($xsl);?//?attach?the?xsl?rules

echo?trim($proc->transformToDoc($xml)->firstChild->wholeText);
?>

以上代码将在分析文件中生成以下信息:

代码语言:javascript
复制
number               match                name      mode  Calls Tot 100us Avg

    0                   cd                                    2      3      1
    1           collection                                    1      1      1

                         Total                                3      4

← XSLTProcessor::setParameter

XsltProcessor::setSecurityPrefs →

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com