XSLT (PHP 4) 函数
在线手册:中文  英文

xslt_set_encoding

(PHP 4 >= 4.0.5)

xslt_set_encodingSet the encoding for the parsing of XML documents

说明

void xslt_set_encoding ( resource $xh , string $encoding )

Set the output encoding for the XSLT transformations. When using the Sablotron backend, this option is only available when you compile Sablotron with encoding support.

参数

xh

XSLT 处理器连接标识符,由 xslt_create() 创建。

encoding

An output encoding, e.g iso-8859-1.

返回值

没有返回值。


XSLT (PHP 4) 函数
在线手册:中文  英文

用户评论:

gloob at litio dot org (2007-09-10 03:13:04)

Beware with http://bugs.php.net/bug.php?id=23148 if you experienced problems compiling php4-xslt.

francois at flash-france dot com (2005-01-26 07:05:03)

sablotron and php have to be correctly linked with iconv library to get this function working
IE on sabotron ./configure :
--with-iconv-prefix=/your/path

Hudson Silva (2004-03-12 09:31:02)

I'm running Mandrake Linux v9.1, with Apache 2.0.48 and PHP 4.3.4...I'm have make PHP with XSLT support, and this work fine, expect because a problem...the function xslt_set_encoding don't work, and i have found a solution...simply, type export LDFLAGS=-lstdc++ before start the configure program of PHP. And this will work!

zibi at sails pl (2003-06-12 08:33:16)

i'm usig it that way:
$ht=xslt_create();
xslt_set_encoding($ht,"ISO-8859-2");
$args = array ( '/_xml' => $xml, '/_xslt' => $xslt);
$result=xslt_process($ht,'arg:/_xml','arg:/_xslt',NULL,$args);
all placed in very nice class ;-)

易百教程