예제 #1
0
 /**
  * Outputs the file - sends headers to browser to force download
  * Only call this after calling close() - will return false if the zip wasn't close()d yet
  * @access	public
  * @see		get_size()		in include/classes/zipfile.class.php
  * @author  Joel Kronenberg
  */
 function send_file($file_name)
 {
     if (!$this->is_closed) {
         $this->close();
     }
     $file_name = str_replace(array('"', '<', '>', '|', '?', '*', ':', '/', '\\'), '', $file_name);
     header("Content-type: archive/zip");
     header("Content-disposition: attachment; filename={$file_name}.zip");
     FileUtility::readfile_in_chunks($this->zipfile_dir . $this->filename . '.zip');
     exit;
 }