Respuesta: Detectar variable Me dá pena de ser tan torpe.
He puesto esto ahora:
$picturepath = $_GET['picturepath'];
$picture = $_GET['picture'];
Header ( "Content-Type: application/octet-stream");
Header ( "Content-Length: ".filesize('$picturepath'));
Header( "Content-Disposition: attachment; filename=$picture");
readfile('$picturepath');
?>
Y ahora me salen estos errores.
Warning: filesize() [function.filesize]: stat failed for $picturepath in descargar.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/dirab51.net/dirab51.net/www/news/descargar.php:5) in /usr/home/dirab51.net/dirab51.net/www/news/descargar.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/dirab51.net/dirab51.net/www/news/descargar.php:5) in /usr/home/dirab51.net/dirab51.net/www/news/descargar.php on line 6
Warning: readfile($picturepath) [function.readfile]: failed to open stream: No such file or directory in /usr/home/dirab51.net/dirab51.net/www/news/descargar.php on line 7
Gracias por estar ahi. |