array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.md5-file.php', 1 => 'md5_file', ), 'up' => array ( 0 => 'ref.strings.php', 1 => 'String 関数', ), 'prev' => array ( 0 => 'function.ltrim.php', 1 => 'ltrim', ), 'next' => array ( 0 => 'function.md5.php', 1 => 'md5', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/strings/functions/md5-file.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
md5_file — 指定したファイルのMD5ハッシュ値を計算する
» RSA Data Security, Inc.
MD5 メッセージダイジェストアルゴリズムを用いて
filename
パラメータで指定したファイルの
MD5ハッシュを計算し、そのハッシュを返します。
ハッシュは、32 文字の 16 進数です。
成功時は文字列、そうでなければ false
例1 md5_file() の使用例
<?php
$file = 'php-5.3.0alpha2-Win32-VC9-x64.zip';
echo 'MD5 file hash of ' . $file . ': ' . md5_file($file);
?>