git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_SGD/tags/3.7.0.2_original@1 eb19766c-00d9-a042-a3a0-45cb8ec72764
10 lines
5.9 KiB
HTML
10 lines
5.9 KiB
HTML
<html><head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
<title>2. Variables whose value can be modified</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.71.1"><link rel="start" href="index.html" title="XML-RPC for PHP"><link rel="up" href="ch08.html" title="Chapter 8. Global variables"><link rel="prev" href="ch08s01.html" title="1. "Constant" variables"><link rel="next" href="ch09.html" title="Chapter 9. Helper functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2. Variables whose value can be modified</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch08s01.html">Prev</a> </td><th width="60%" align="center">Chapter 8. Global variables</th><td width="20%" align="right"> <a accesskey="n" href="ch09.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2751"></a>2. Variables whose value can be modified</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xmlrpc-defencoding"></a>2.1. xmlrpc_defencoding</h3></div></div></div><code class="fieldsynopsis"><span class="varname">$xmlrpc_defencoding </span><span class="initializer">= "UTF8"</span>;</code><p>This variable defines the character set encoding that will be used by the xml-rpc client and server to decode the received messages, when a specific charset declaration is not found (in the messages sent non-ascii chars are always encoded using character references, so that the produced xml is valid regardless of the charset encoding assumed).</p><p>Allowed values: <code class="literal">"UTF8"</code>, <code class="literal">"ISO-8859-1"</code>, <code class="literal">"ASCII".</code></p><p>Note that the appropriate RFC actually mandates that XML received over HTTP without indication of charset encoding be treated as US-ASCII, but many servers and clients 'in the wild' violate the standard, and assume the default encoding is UTF-8.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e2776"></a>2.2. xmlrpc_internalencoding</h3></div></div></div><p><code class="fieldsynopsis"><span class="varname">$xmlrpc_internalencoding </span><span class="initializer">= "ISO-8859-1"</span>;</code>This variable defines the character set encoding that the library uses to transparently encode into valid XML the xml-rpc values created by the user and to re-encode the received xml-rpc values when it passes them to the PHP application. It only affects xml-rpc values of string type. It is a separate value from xmlrpc_defencoding, allowing e.g. to send/receive xml messages encoded on-the-wire in US-ASCII and process them as UTF-8. It defaults to the character set used internally by PHP (unless you are running an MBString-enabled installation), so you should change it only in special situations, if e.g. the string values exchanged in the xml-rpc messages are directly inserted into / fetched from a database configured to return UTF8 encoded strings to PHP. Example usage:</p><pre class="programlisting">
|
|
<?php
|
|
|
|
include('xmlrpc.inc');
|
|
$xmlrpc_internalencoding = 'UTF-8'; // this has to be set after the inclusion above
|
|
$v = new xmlrpcval('κόσμε'); // This xmlrpc value will be correctly serialized as the greek word 'kosme'
|
|
|
|
</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e2789"></a>2.3. xmlrpcName</h3></div></div></div><p><code class="fieldsynopsis"><span class="varname">$xmlrpcName </span><span class="initializer">= "XML-RPC for PHP"</span>;</code>The string representation of the name of the XML-RPC for PHP library. It is used by the client for building the User-Agent HTTP header that is sent with every request to the server. You can change its value if you need to customize the User-Agent string.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e2799"></a>2.4. xmlrpcVersion</h3></div></div></div><p><code class="fieldsynopsis"><span class="varname">$xmlrpcVersion </span><span class="initializer">= "2.2"</span>;</code>The string representation of the version number of the XML-RPC for PHP library in use. It is used by the client for building the User-Agent HTTP header that is sent with every request to the server. You can change its value if you need to customize the User-Agent string.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e2809"></a>2.5. xmlrpc_null_extension</h3></div></div></div><p>When set to <code class="constant">TRUE</code>, the lib will enable support for the <NIL/> xmlrpc value, as per the extension to the standard proposed here. This means that <NIL/> tags will be parsed as valid xmlrpc, and the corresponding xmlrpcvals will return "null" for <code class="methodname">scalarTyp()</code>.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch08s01.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch08.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch09.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1. "Constant" variables </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. Helper functions</td></tr></table></div></body></html> |