Ciao ragazzi.. ho un problema con i download
in php
ho fatto questa paginetta php che viene lanciata da un html
<?php
$dimensioni_file=filesize("../pdf/".$file);
$nome_file = "../pdf/".$file;
echo $dimensioni_file;
echo $nome_file;
header("Content-type: Application/octet-stream");
header("Content-Disposition: attachment; filename=$nome_file");
header("Content-Description: $nome_file");
header("Content-Length: $dimensioni_file");
readfile($nome_file);
?>
LA PAGINA LANCIA IL DOWNLOAD MA MI VEINE PROPOSTO DI SALVARE IL FILE
SENZA IL NOME CORRETTO E COME FILE DI TESTO! QUALCUNO MI SA DIRE COME FARE ? DOVREBBE PRENDERSI IL CONTENT-TYPE IN AUTOMATICO SE NON ERRO?
CIAO CIAO E GRAZIE!