com doc/zh: Update hash-file.xml Close php/doc-zh#9: reference/hash/functions/hash-file.xml
[email protected] (Dai Jie) Tue, 19 Jan 2021 06:55:17 +0000
| Newsgroups | php.doc.zh |
|---|---|
| Message-ID | <[email protected]> |
Commit: bede9b06ef7fcfd6d6457e953f0efeb39ff23c80 Author: 蒋文健 <[email protected]> Tue, 19 Jan 2021 09:14:20 +0800 Committer: daijie <[email protected]> Tue, 19 Jan 2021 14:55:17 +0800 Parents: 82b7c9970e076718a652dc6e42dfdc294a8c116b Branches: master Link: http://git.php.net/?p=doc/zh.git;a=commitdiff;h=bede9b06ef7fcfd6d6457e953f0efeb39ff23c80 Log: Update hash-file.xml Close php/doc-zh#9 Bugs: https://bugs.php.net/9 Changed paths: M reference/hash/functions/hash-file.xml Diff: diff --git a/reference/hash/functions/hash-file.xml b/reference/hash/functions/hash-file.xml index f7bafe67..28f5df8d 100644 --- a/reference/hash/functions/hash-file.xml +++ b/reference/hash/functions/hash-file.xml @@ -1,21 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: ff3d7bb38b710c3c529b583db04362c791d6ad90 Maintainer: yuanyuqiang Status: ready --> +<!-- EN-Revision: dabaf662b17f594cd536ff68ea807b0fbc99d0ee Maintainer: yuanyuqiang Status: ready --> <!-- Reviewed: no --> <!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. --> <refentry xml:id="function.hash-file" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>hash_file</refname> - <refpurpose>使用给定文件的内容生成哈希值</refpurpose> + <refpurpose>给指定文件的内容生成哈希值</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>string</type><methodname>hash_file</methodname> + <type class="union"><type>string</type><type>false</type></type><methodname>hash_file</methodname> <methodparam><type>string</type><parameter>algo</parameter></methodparam> <methodparam><type>string</type><parameter>filename</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>&false;</initializer></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>binary</parameter><initializer>&false;</initializer></methodparam> </methodsynopsis> </refsect1> @@ -27,8 +27,8 @@ <term><parameter>algo</parameter></term> <listitem> <para> - 要使用的哈希算法的名称,例如:"md5","sha256","haval160,4" 等。 - 在 <function>hash_algos</function> 中查看支持的算法。 + 要使用的哈希算法的名称(例如:"md5","sha256","haval160,4" 等)。 + 可以在 <function>hash_algos</function> 中查看当前支持的算法。 </para> </listitem> </varlistentry> @@ -36,16 +36,16 @@ <term><parameter>filename</parameter></term> <listitem> <para> - 要进行哈希运算的文件路径。支持 fopen 封装器。 + 要进行哈希运算的文件位置的 URL ;支持 fopen 封装协议。 </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>raw_output</parameter></term> + <term><parameter>binary</parameter></term> <listitem> <para> - 设置为 &true;,输出格式为原始的二进制数据。 - 设置为 &false;,输出小写的 16 进制字符串。 + 设置为 &true; 时,输出原始二进制数据。 + 设置为 &false; 时,输出小写的十六进制字符串。 </para> </listitem> </varlistentry> @@ -56,8 +56,8 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - 如果 <parameter>raw_output</parameter> 设置为 &true;, 则返回原始二进制数据表示的信息摘要, - 否则返回 16 进制小写字符串格式表示的信息摘要。 + 如果 <parameter>binary</parameter> 设置为 true, 则返回原始二进制数据表示的信息摘要, + 否则返回十六进制小写字符串格式表示的信息摘要。 </para> </refsect1> @@ -71,7 +71,6 @@ <?php /* 创建一个要计算哈希值的文件 */ file_put_contents('example.txt', 'The quick brown fox jumped over the lazy dog.'); - echo hash_file('md5', 'example.txt'); ?> ]]> @@ -100,7 +99,6 @@ echo hash_file('md5', 'example.txt'); </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml