src/Zip.php
public function create($file = '')
    {
        $this->file   = $file;
        $this->memory = '';
        $this->fh     = 0;

        if ($this->file) {
            $this->fh = @fopen($this->file, 'wb');

            if (!$this->fh) {
                throw new ArchiveIOException('Could not open file for writing: '.$this->file);
            }
        }
        $this->writeaccess = true;
        $this->closed      = false;
        $this->ctrl_dir    = array();
    }
public function create($file = '')
    {
        $this->file   = $file;
        $this->memory = '';
        $this->fh     = 0;

        if ($this->file) {
            $this->fh = @fopen($this->file, 'wb');

            if (!$this->fh) {
                throw new ArchiveIOException('Could not open file for writing: '.$this->file);
            }
        }
        $this->writeaccess = true;
        $this->closed      = false;
        $this->ctrl_dir    = array();
    }
public function create ( $ file = '' ) { $ this -> file = $ file ; $ this -> memory = '' ; $ this -> fh = 0 ; if ( $ this -> file ) { $ this -> fh = @ fopen ( $ this -> file , 'wb' ) ; if ( ! $ this -> fh ) { throw new ArchiveIOException ( 'Could not open file for writing: ' . $ this -> file ) ; } } $ this -> writeaccess = true ; $ this -> closed = false ; $ this -> ctrl_dir = array ( ) ; }
Create a new ZIP file

If $file is empty, the zip file will be created in memory

@param string $file
@throws ArchiveIOException
Create a new ZIP file