
23/10/2013, 16:17
|
| | Fecha de Ingreso: octubre-2013
Mensajes: 3
Antigüedad: 11 años, 5 meses Puntos: 0 | |
Respuesta: Problema al forzar descarga de archivos txt php ya quedo solucionado!!
Al final el codigo quedo:
$archivo = 'C:/wamp/www/scpeg/app/webroot/L_2147483647_08_Oct_2013_15_53_08.txt';
$TheFile = basename($archivo);
header('Content-Description: File Transfer');
ob_end_flush();
header('Content-Type: text/plain');
header('Content-Disposition: attachment; filename=' . $TheFile);
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($archivo));
ob_clean();
flush();
readfile($archivo); |