Ref/recode-Phpdoc专题
recode_file
Recode from file to file according to recode request
说明
bool <span
class="methodname">recode_file ( <span
class="type">string $request , <span
class="methodparam">resource $input ,
resource
$output )
Recode the file referenced by file handle input into the file
referenced by file handle output according to the recode request.
参数
request
The desired recode request type
input
A local file handle resource for the input
output
A local file handle resource for the output
返回值
Returns false, if unable to comply, true otherwise.
范例
示例 #1 Basic recode_file example
<?php
$input = fopen('input.txt', 'r');
$output = fopen('output.txt', 'w');
recode_file("us..flat", $input, $output);
?>
注释
This function does not currently process file handles referencing remote files (URLs). Both file handles must refer to local files.
参见
- fopen
recode_string
Recode a string according to a recode request
说明
string <span
class="methodname">recode_string ( <span
class="methodparam">string $request ,
string
$string )
Recode the string string according to the recode request request.
参数
request
The desired recode request type
string
The string to be recoded
返回值
Returns the recoded string or false, if
unable to perform the recode request.
范例
示例 #1 Basic recode_string example
<?php
echo recode_string("us..flat", "The following character has a diacritical mark: á");
?>
注释
A simple recode request may be "lat1..iso646-de".
参见
- The GNU Recode documentation of your installation for detailed instructions about recode requests.
recode
别名 recode_string
说明
此函数是该函数的别名: recode_string.
目录
- recode_file — Recode from file to file according to recode request
- recode_string — Recode a string according to a recode request
- recode — 别名 recode_string