note 45954 deleted from function.md5-file by aidan
| From: | aidan@php.net | Date: | Sun, 14 Nov 2004 18:16:14 +0000 |
| Subject: | note 45954 deleted from function.md5-file by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-80521@lists.php.net to get a copy of this message | ||
Note Submitter: jonas_roli at yahoo dot com dot br
----
This is a md5_file alternative function for PHP version < 4.2.0.
if (!function_exists('md5_file')) {
function md5_file($file_name)
{
if (!file_exists($file_name)) {
trigger_error('md5_file(): Unable to open file', E_USER_WARNING);
} else {
$file_string = implode('', file($file_name));
return md5($file_string);
}
}
}