
download php descarga 0 bytes
Publicado por nicolas (4 intervenciones) el 28/11/2018 20:00:26
Hola tengo un problema con este script. Me esta escargando 0 bytes y no se porque. Necesito ayuda.
muchas gracias!
muchas gracias!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public function run(){
ob_start();
$dir_subida = Application::getPath('files');
$file = "..".$dir_subida."/".$_GET['file'];
$file_name=explode("track_",$file);
header("Content-type: octet/stream");
header("Content-disposition: attachment; filename=".$file_name[1].";");
header("Content-Length: ".filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
Valora esta pregunta


1