Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/07/2009, 09:05
Avatar de ACX_POISON
ACX_POISON
 
Fecha de Ingreso: abril-2008
Ubicación: Talca-Chile
Mensajes: 750
Antigüedad: 16 años, 1 mes
Puntos: 7
Respuesta: programar opcion de ABRIR ARCHIVO y DESCARGAR ARCHIVOS que estan en el ser

aqui en el foro me pasaron un codigo para eso, aun no recuerdo quien fue
el codigo es este

Código PHP:
<?php
//envia como descarga un archivo determinado
$file="galeria/img/caja.png";
header("Content-Disposition: attachment; filename=" urlencode($file));   
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Description: File Transfer");            
header("Content-Length: " filesize($file));
flush(); // this doesn't really matter.

$fp fopen($file"r");
while (!
feof($fp))
{
    echo 
fread($fp65536);
    
flush(); // this is essential for large downloads

fclose($fp);
echo
"Descargando...";
?>
__________________
Me junto con los que Saben, Queriendo Saber.