function magic_bytes($path, $position = 0, $bytes = 4) { if (!file_exists($path)) { return null; } $handle = fopen($path, 'rb'); fseek($handle, $position); $bytes = bin2hex(fread($handle, $bytes)); fclose($handle); return $bytes; }
您最近使用了: