44 $this->archiver =
new zipfile();
45 $this->ext = trim(
$ext);
46 $this->mimeType = trim($mimyType);
57 public function addFile($filepath, $newfilename = null)
60 $fp = @fopen($filepath,
"r");
64 $data = fread($fp, filesize($filepath));
66 $filename = (isset($newfilename) && trim($newfilename) !=
'') ? trim($newfilename) : $filepath;
67 $result = $this->archiver->addFile($data, $filename, filemtime($filename));
82 $fp = @fopen($filepath,
"rb");
86 $data = fread($fp, filesize($filepath));
88 $filename = (isset($newfilename) && trim($newfilename) !=
'') ? trim($newfilename) : $filepath;
89 $result = $this->archiver->addFile($data, $filename, filemtime($filename));
104 $result = $this->archiver->addFile($data, $filename, $time);
134 $result = $this->archiver->file();
download($name, $gzip=true)
addBinaryFileData(&$data, $filename, $time=0)
addFileData(&$data, $filename, $time=0)
__construct($ext= '.zip', $mimyType= 'application/x-zip')
addFile($filepath, $newfilename=null)
addBinaryFile($filepath, $newfilename=null)