Si me parece que no me toma bien el nombre del archivo.
este es el error
Código HTML:
<br />
<b>Warning</b>: readfile(D:/Nacho/Laboratorio 2/www/sabweb/b/) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: Permission denied in <b>D:\Nacho\Laboratorio 2\www\sabweb\descarga.php</b> on line <b>13</b><br />
en descarga.php solo tengo este código nada de html solo código php
Código PHP:
<?php
$archivo = $_GET ['file_a'];
$files_folder = "D:/Nacho/Laboratorio 2/www/sabweb/b";
$size = $files_folder."/".$archivo;
//$id=$archivo;
//Header("Content-Length: ".filesize($size))
//Header("Content-Disposition: attachment; filename=".$archivo."\n\n");
Header("Content-Type: application/octet-stream");
Header("Content-Length: ".filesize($size));
Header("Content-Disposition: attachment; filename=a.txt");
//Header("Content-Disposition: attachment; filename=$size");
readfile($size);
?>