note 43069 added to function.sha1-file
| From: | Vincent at rn2 dot php dot net | Date: | Tue, 08 Jun 2004 20:48:11 +0000 |
| Subject: | note 43069 added to function.sha1-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-70446@lists.php.net to get a copy of this message | ||
Here is a handy way to get sha1 of a file's contents.
<?php
function sha1_of_file($file) {
if (!file_exists($file))
return false;
$contents = join("",file($file));
return sha1($contents);
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.sha1-file.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43069
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43069&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43069&report=yes
Search -- http://master.php.net/manage/user-notes.php