| Re: [crisos] Download file via PHP |
[ Thread Index | Date Index | More lists.tuxfamily.org/crisos Archives ]
|
Ovviamente tutte le pagine in php funzionano, ho problemi solo per il
modulo di download dei files. Questo è un esempio, che personalmente non funziona su questa architettura, ma funziona su normali pc: <?php error_reporting(E_ALL); $file = "06.tar.gz"; $filename=$file; $filepath=$file; $filesize=filesize($filepath); header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); header("Content-Type: application/zip"); header("Content-Length: ".$filesize); header("Content-Disposition: attachment; filename=$filename"); header("Content-Transfer-Encoding: binary"); $fp = fopen($filepath, 'rb'); $buffer = fread($fp, $filesize); fclose ($fp); sleep(1); print $buffer; exit(); ?> Claudio ha scritto: Ciao Il 23 giugno 2008 18.53, Andrea Russi <andrearussi@xxxxxxxxx> ha scritto: |
begin:vcard fn:Andrea Russi n:Russi;Andrea org:;Ingegneria dell'Automazione adr:;;;Roma;Roma;;Italia email;internet:andrearussi@xxxxxxxxx title:Dottore x-mozilla-html:TRUE version:2.1 end:vcard
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |