Salve(per l'ennesima volta),
ho la necessit di eseguire un download una volta si clicca su un elemento,se una cartella creo uno zip(e ci riesco,anche se un po' male,ma va be'),ma quando devo eseguire il download mi esce uno schifo nell'iframe:
codice:
K nonvisPK nonvisnonvis/PK.("nonvisnonvis/Alimenti - Copia.xlsxzeT\m7i$;@&;-Ip׃whs{\n߿ǻGQk֬U@$  D#akhl㨯fg jmE /Fq MŇk:5BfpD6Sxy0-Aϲk> =&QPwM C_\xZt4)}zUCxHJ ەm /dY,.r0MI62smibb/ǡκAh,yє y8 =hiAfD
Ho cercato di copiarlo tutto ma firefox si inchiodato,occupando 1,8 GB di ram....
Questo il codice:

Codice PHP:
public function forceDownload($archiveName) {
        if(
ini_get('zlib.output_compression')) {
            
ini_set('zlib.output_compression''Off');
        }

        
// Security checks
        
if( $archiveName == "" ) {
            echo 
"<html><title>Public Photo Directory - Download </title><body>
[B]ERROR:[/B] The download file was NOT SPECIFIED.</body></html>"
;
            exit;
        }
        elseif ( ! 
file_exists$archiveName ) ) {
            echo 
"<html><title>Public Photo Directory - Download </title><body>
[B]ERROR:[/B] File not found.</body></html>"
;
            exit;
        }

        
header("Pragma: public");
        
header("Expires: 0");
        
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
        
header("Cache-Control: private",false);
        
header("Content-Type: application/zip");
        
header("Content-Disposition: attachment; filename=".basename($archiveName).";" );
        
header("Content-Transfer-Encoding: binary");
        
header("Content-Length: ".filesize($archiveName));
        
readfile("$archiveName");
    } 
Qualcuno sa aiutarmi?