<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # PHP sha1_file() 函數 ## 定義和用法 sha1_file() 函數計算文件的 SHA-1 散列。 sha1() 函數使用美國 Secure Hash 算法 1。 如果成功,則返回所計算的 SHA-1 散列,如果失敗,則返回 false。 ### 語法 ``` sha1_file(_string_,_raw_) ``` | 參數 | 描述 | | --- | --- | | _string_ | 必需。規定要計算的文件。 | | _raw_ | 可選。規定十六進制或二進制輸出格式: `TRUE` - 原始 20 字符二進制格式 `FALSE` - 默認。40 字符十六進制數注釋:該參數是 PHP 5.0 中添加的。 | ## 例子 ### 例子 1 ``` <?php $filename = "test.txt"; $sha1file = sha1_file($filename); echo $sha1file; ?> ``` 輸出: ``` aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d ``` ### 例子 2 在一個文件中存儲 "test.txt" 的 SHA-1 散列: ``` <?php $sha1file = sha1_file("test.txt"); file_put_contents("sha1file.txt",$sha1file); ?> ``` 在本例中,我們將測試 "test.txt" 是否已更改(即 SHA-1 hash 是否已更改): ``` <?php $sha1file = file_get_contents("sha1file.txt"); if (sha1_file("test.txt") == $sha1file) { echo "The file is ok."; } else { echo "The file has been changed."; } ?> ``` 輸出: ``` The file is ok. ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看