Beispiel #1
0
function filelist($folderRoot, $folder = '')
{
    $handle = opendir($folderRoot . '/' . $folder);
    while ($file = readdir($handle)) {
        if (is_dir($folderRoot . '/' . $folder . '/' . $file)) {
            if ($file == '.' || $file == '..') {
            } else {
                $p = $file;
                if ($folder > '') {
                    $p = $folder . '/' . $p;
                }
                filelist($folderRoot, $p);
            }
        } else {
            $filehex = $folder . '/' . $file . "\t" . crc32_file3($folderRoot . '/' . $folder . '/' . $file);
            $GLOBALS['filehexlist'] .= $filehex . "\r\n";
        }
    }
}
function filelist($folderRoot,$folder=''){
	$handle=opendir($folderRoot.'/'.$folder);
	while($file=readdir($handle)){
		//if($folder=='.'){
		//	$path=$file;
		//}else{
			$path=$folderRoot.'/'.$folder.'/'.$file;
		//}
		if(is_dir($path)){
			if($file=='.'||$file=='..'){
			}else{
				filelist($folderRoot,$path);
			}
		}else{
			$pathx=$folder.'/'.$file;
			$filehex=$pathx."\t".crc32_file3($path);
			$GLOBALS['filehexlist'].=$filehex."\r\n";
		}
	}
}