⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.xdiff-file-rabdiff.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Make binary diff of two files using the Rabin's polynomial fingerprinting algorithm</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="function.xdiff-file-patch.html">xdiff_file_patch</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.xdiff-string-bdiff-size.html">xdiff_string_bdiff_size</a></div> <div class="up"><a href="ref.xdiff.html">xdiff Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.xdiff-file-rabdiff" class="refentry"> <div class="refnamediv">  <h1 class="refname">xdiff_file_rabdiff</h1>  <p class="verinfo">(No version information available, might be only in CVS)</p><p class="refpurpose"><span class="refname">xdiff_file_rabdiff</span> &mdash; <span class="dc-title">Make binary diff of two files using the Rabin&#039;s polynomial fingerprinting algorithm</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>xdiff_file_rabdiff</b></b></span>    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$old_file</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$new_file</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$dest</tt></span>   )</div>  <p class="para rdfs-comment">   Makes a binary diff of two files and stores the result in a patch file.   The difference between this function and <a href="function.xdiff-file-bdiff.html" class="function">xdiff_file_bdiff()</a> is different   algorithm used which should result in faster execution and smaller diff produced.   This function works with both text and binary files. Resulting patch   file can be later applied using <a href="function.xdiff-file-bpatch.html" class="function">xdiff_file_bpatch()</a>/<a href="function.xdiff-string-bpatch.html" class="function">xdiff_string_bpatch()</a>.  </p>  <p class="para">   For more details about differences between algorithm used please check <a href="http://www.xmailserver.org/xdiff-lib.html" class="link external">&raquo; libxdiff</a>    website.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">old_file</tt></i></span>     <dd>      <p class="para">       Path to the first file. This file acts as &quot;old&quot; file.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">new_file</tt></i></span>     <dd>      <p class="para">       Path to the second file. This file acts as &quot;new&quot; file.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">dest</tt></i></span>     <dd>      <p class="para">       Path of the resulting patch file. Resulting file containts differences       between &quot;old&quot; and &quot;new&quot; files. It is in binary format and is human-unreadable.      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns <b><tt>TRUE</tt></b> on success or <b><tt>FALSE</tt></b> on failure.  </p> </div> <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 <b>xdiff_file_rabdiff()</b> example</b></p>    <div class="example-contents"><p>     The following code makes binary diff of two archives.    </p></div>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$old_version&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'my_script_1.0.tgz'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$new_version&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'my_script_1.1.tgz'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">xdiff_file_rabdiff</span><span style="color: #007700">(</span><span style="color: #0000BB">$old_version</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$new_version</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'my_script.bdiff'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>   </div>  </p> </div> <div class="refsect1 notes">  <h3 class="title">Notes</h3>  <blockquote><p><b class="note">Note</b>:        Both files will be loaded into memory so ensure that your memory_limit is    set high enough.   <br />  </p></blockquote> </div> <div class="refsect1 seealso">  <h3 class="title">See Also</h3>  <p class="para">   <ul class="simplelist">    <li class="member"><a href="function.xdiff-file-bpatch.html" class="function" rel="rdfs-seeAlso">xdiff_file_bpatch()</a></li>   </ul>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.xdiff-file-patch.html">xdiff_file_patch</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.xdiff-string-bdiff-size.html">xdiff_string_bdiff_size</a></div> <div class="up"><a href="ref.xdiff.html">xdiff Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -