function.recode-file.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 147 行
HTML
147 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Recode from file to file according to recode request</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ref.recode.html">Recode Functions</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.recode-string.html">recode_string</a></div> <div class="up"><a href="ref.recode.html">Recode Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.recode-file" class="refentry"> <div class="refnamediv"> <h1 class="refname">recode_file</h1> <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">recode_file</span> — <span class="dc-title">Recode from file to file according to recode request</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><b><b>recode_file</b></b></span> ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$request</tt></span> , <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$input</tt></span> , <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$output</tt></span> )</div> <p class="para rdfs-comment"> Recode the file referenced by file handle <i><tt class="parameter">input</tt></i> into the file referenced by file handle <i><tt class="parameter">output</tt></i> according to the recode <i><tt class="parameter">request</tt></i>. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">request</tt></i></span> <dd> <p class="para"> The desired recode request type </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">input</tt></i></span> <dd> <p class="para"> A local file handle <a href="language.types.resource.html" class="type resource">resource</a> for the <i><tt class="parameter">input</tt></i> </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">output</tt></i></span> <dd> <p class="para"> A local file handle <a href="language.types.resource.html" class="type resource">resource</a> for the <i><tt class="parameter">output</tt></i> </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <b><tt>FALSE</tt></b>, if unable to comply, <b><tt>TRUE</tt></b> otherwise. </p> </div> <div class="refsect1 examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example"> <p><b>Example #1 Basic <b>recode_file()</b> example</b></p> <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB"><?php<br />$input </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'input.txt'</span><span style="color: #007700">, </span><span style="color: #DD0000">'r'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$output </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'output.txt'</span><span style="color: #007700">, </span><span style="color: #DD0000">'w'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">recode_file</span><span style="color: #007700">(</span><span style="color: #DD0000">"us..flat"</span><span style="color: #007700">, </span><span style="color: #0000BB">$input</span><span style="color: #007700">, </span><span style="color: #0000BB">$output</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span></span></code></div> </div> </div> </p> </div> <div class="refsect1 notes"> <h3 class="title">Notes</h3> <p class="para"> This function does not currently process file handles referencing remote files (URLs). Both file handles must refer to local files. </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="function.fopen.html" class="function" rel="rdfs-seeAlso">fopen()</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ref.recode.html">Recode Functions</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.recode-string.html">recode_string</a></div> <div class="up"><a href="ref.recode.html">Recode Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?