FeaturePhp/Exporter/DownloadZipExporter.php
private function download($productLineName) {
        $productLineName = str_replace("\"", "", $productLineName);
        if (headers_sent())
            throw new DownloadZipExporterException("could download zip archive");
        header("Content-Type: application/zip");
        header("Content-Disposition: attachment; filename=\"$productLineName.zip\"");
        set_time_limit(0);
        $file = @fopen($this->target, "rb");
        while(!feof($file)) {
            print(@fread($file, 1024*8));
            ob_flush();
            flush();
        }
    }
private function download($productLineName) {
        $productLineName = str_replace("\"", "", $productLineName);
        if (headers_sent())
            throw new DownloadZipExporterException("could download zip archive");
        header("Content-Type: application/zip");
        header("Content-Disposition: attachment; filename=\"$productLineName.zip\"");
        set_time_limit(0);
        $file = @fopen($this->target, "rb");
        while(!feof($file)) {
            print(@fread($file, 1024*8));
            ob_flush();
            flush();
        }
    }
private function download ( $ productLineName ) { $ productLineName = str_replace ( "\"" , "" , $ productLineName ) ; if ( headers_sent ( ) ) throw new DownloadZipExporterException ( "could download zip archive" ) ; header ( "Content-Type: application/zip" ) ; header ( "Content-Disposition: attachment; filename=\"$productLineName.zip\"" ) ; set_time_limit ( 0 ) ; $ file = @ fopen ( $ this -> target , "rb" ) ; while ( ! feof ( $ file ) ) { print ( @ fread ( $ file , 1024 * 8 ) ) ; ob_flush ( ) ; flush ( ) ; } }
Downloads the temporary ZIP archive.
This only works when no headers and no output have been sent yet, otherwise users receive
corrupted ZIP files.
@param string $productLineName the name of the product line, used as the ZIP archive file name
Downloads the temporary ZIP archive . This only works when no headers and no output have been sent yet otherwise users receive corrupted ZIP files .