Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 9587

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>sha1_file</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="String 字符串处理函数"
HREF="ref.strings.html"><LINK
REL="PREVIOUS"
TITLE="setlocale"
HREF="function.setlocale.html"><LINK
REL="NEXT"
TITLE="sha1"
HREF="function.sha1.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.setlocale.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.sha1.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.sha1-file"
></A
>sha1_file</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN226688"
></A
><P
>    (PHP 4 &#62;= 4.3.0, PHP 5)</P
>sha1_file&nbsp;--&nbsp;Calculate the sha1 hash of a file</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN226691"
></A
><H2
>说明</H2
>string <B
CLASS="methodname"
>sha1_file</B
> ( string filename [, bool raw_output] )<BR
></BR
><P
>&#13;   Calculates the sha1 hash of <CODE
CLASS="parameter"
>filename</CODE
> using the
   <A
HREF="http://www.faqs.org/rfcs/rfc3174"
TARGET="_top"
>US Secure Hash Algorithm 1</A
>,
   and returns that hash. The hash is a 40-character hexadecimal number.
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN226705"
></A
><H2
>参数</H2
><P
>&#13;   <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><CODE
CLASS="parameter"
>filename</CODE
></DT
><DD
><P
>&#13;       The filename
      </P
></DD
><DT
><CODE
CLASS="parameter"
>raw_output</CODE
></DT
><DD
><P
>&#13;       When <TT
CLASS="constant"
><B
>TRUE</B
></TT
>, returns the digest in raw binary format with a length of
       20. Defaults to <TT
CLASS="constant"
><B
>FALSE</B
></TT
>.
      </P
></DD
></DL
></DIV
>
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN226721"
></A
><H2
>返回值</H2
><P
>&#13;   Returns a string on success, <TT
CLASS="constant"
><B
>FALSE</B
></TT
> otherwise.
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN226725"
></A
><H2
>更新日志</H2
><P
>&#13;   <DIV
CLASS="informaltable"
><P
></P
><A
NAME="AEN226728"
></A
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>版本</TH
><TH
>说明</TH
></TR
></THEAD
><TBODY
><TR
><TD
>5.0.0</TD
><TD
>&#13;        Added the <CODE
CLASS="parameter"
>raw_output</CODE
> parameter
       </TD
></TR
><TR
><TD
>5.1.0</TD
><TD
>&#13;        Changed the function to use the streams API. It means that you can use
        it with wrappers, like <TT
CLASS="literal"
>sha1_file('http://example.com/..')</TT
>
       </TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
>
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN226743"
></A
><H2
>参见</H2
><P
>&#13;   <P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
><A
HREF="function.sha1.html"
><B
CLASS="function"
>sha1()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.md5-file.html"
><B
CLASS="function"
>md5_file()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.crc32.html"
><B
CLASS="function"
>crc32()</B
></A
></TD
></TR
></TBODY
></TABLE
><P
></P
>
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.setlocale.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.sha1.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>setlocale</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.strings.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>sha1</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>