Corrected error in recode_file prototype

Added examples for recode_string and recode_file


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@35539 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Zak Greant 2000-11-10 06:02:49 +00:00
parent f5698af7cd
commit bd7fbc9690

View file

@ -36,13 +36,19 @@
</funcsynopsis>
<para>
Recode the string <parameter>string</parameter> according to
the recode request <parameter>request</parameter>. Returns
FALSE, if unable to comply, TRUE otherwise.
the recode request <parameter>request</parameter>. Returns the
recoded string or FALSE, if unable to perform the recode request.
</para>
<para>
A simple recode request may be &quot;lat1..iso646-de&quot;.
See also the GNU Recode documentation of your installation
for detailed instructions about recode requests.
<example>
<title>Basic <function>recode_string</function> example:</title>
<programlisting role="php">
print recode_string (&quot;us..flat&quot;, &quot;The following character has a diacritical mark: &amp;aacute;&quot;);
</programlisting>
</example>
</para>
</refsect1>
</refentry>
@ -81,22 +87,33 @@
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>bool <function>recode_file</function></funcdef>
<paramdef>int <parameter>input</parameter></paramdef>
<paramdef>int <parameter>output</parameter></paramdef>
<funcdef>boolean <function>recode_file</function></funcdef>
<paramdef>string <parameter>request</parameter></paramdef>
<paramdef>resource <parameter>input</parameter></paramdef>
<paramdef>resource <parameter>output</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Recode the file referenced by file handle
<parameter>input</parameter> into the file referenced by file
handle <parameter>output</parameter> according to the recode
request. Returns FALSE, if unable to comply, TRUE
otherwise.
<parameter>request</parameter>. Returns FALSE, if unable to
comply, TRUE otherwise.
</para>
<para>
This function does not currently process filehandles referencing
remote files (URLs). Both filehandles must refer to local files.
</para>
<para>
<example>
<title>Basic <function>recode_file</function> example</title>
<programlisting role="php">
$input = fopen ('input.txt', 'r');
$output = fopen ('output.txt', 'w');
recode_file (&quot;us..flat&quot;, $input, $output);
</programlisting>
</example>
</para>
</refsect1>
</refentry>