Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezmd5.php
Go to the documentation of this file.
1 <?php
17 class eZMD5
18 {
19 const CHECK_SUM_LIST_FILE = 'share/filelist.md5';
20
29 static function checkMD5Sums( $file, $subDirStr = '' )
30 {
31 $result = array();
32 $lines = file( $file, FILE_IGNORE_NEW_LINES );
33
34 if ( $lines !== false && isset( $lines[0] ) )
35 {
36 foreach ( $lines as $key => $line )
37 {
38 if ( isset( $line[34] ) )
39 {
40 $md5Key = substr( $line, 0, 32 );
41 $filename = $subDirStr . substr( $line, 34 );
42 if ( !file_exists( $filename ) || $md5Key != md5_file( $filename ) )
43 {
44 $result[] = $filename;
45 }
46 }
47 }
48 }
49
50 return $result;
51 }
52 }
53 ?>
eZMD5
Class handling MD5 file operations.
Definition: ezmd5.php:18
eZMD5\CHECK_SUM_LIST_FILE
const CHECK_SUM_LIST_FILE
Definition: ezmd5.php:19
eZMD5\checkMD5Sums
static checkMD5Sums( $file, $subDirStr='')
Definition: ezmd5.php:29
$result
$result
Definition: companysearch.php:94
$lines
else $lines
Definition: csseditor.php:58
file_exists
static file_exists( $inifilename)
Definition: eZPBINIFile.php:195
$file
$file
Definition: ezfilemanager/user/filedownload.php:35
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.