首页 >函数列表 >xslt_set_log

xslt_set_log

xslt_set_log

(PHP 4 >= 4.0.6)

xslt_set_logSet the log file to write log messages to

说明

void xslt_set_log ( resource $xh [, mixed $log ] )

This function allows you to set the file in which you want XSLT log messages to, XSLT log messages are different than error messages, in that log messages are not actually error messages but rather messages related to the state of the XSLT processor. They are useful for debugging XSLT, when something goes wrong.

By default logging is disabled, in order to enable logging you must first call xslt_set_log() with a boolean parameter which enables logging, then if you want to set the log file to debug to, you must then pass it a string containing the filename.

参数

xh

The XSLT processor link identifier, created with xslt_create().

log

This parameter is either a boolean value which toggles logging on and off, or a string containing the logfile in which log errors too.

返回值

没有返回值。

注释

Note:

请注意: 在使用 Windows 时,路径必须由 file:// 开头。

范例

Example #1 Using the XSLT Logging features

<?php

$xh 
xslt_create();
xslt_set_log($xhtrue);
xslt_set_log($xhgetcwd() . '/myfile.log');

$result xslt_process($xh'dog.xml''pets.xsl');
echo 
$result;

xslt_free($xh);
?>


  • xslt_backend_info
  • xslt_backend_name
  • xslt_backend_version
  • xslt_create
  • xslt_errno
  • xslt_error
  • xslt_free
  • xslt_getopt
  • xslt_process
  • xslt_setopt
  • xslt_set_base
  • xslt_set_encoding
  • xslt_set_error_handler
  • xslt_set_log
  • xslt_set_object
  • xslt_set_sax_handler
  • xslt_set_sax_handlers
  • xslt_set_scheme_handler
  • xslt_set_scheme_handlers
  • PHP MySQL HTML CSS JavaScript MSSQL AJAX .NET JSP Linux Mac ASP 服务器 SQL jQuery C# C++ java Android IOS oracle MongoDB SQLite wamp 交通频道