Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/07/2009, 12:37
pollo_c2
 
Fecha de Ingreso: junio-2008
Mensajes: 50
Antigedad: 15 aos, 11 meses
Puntos: 0
Respuesta: programar opcion de ABRIR ARCHIVO y DESCARGAR ARCHIVOS que estan en el ser

muchas gracias ACX!! aplique tu codigo de la siguiente manera:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<?php
//envia como descarga un archivo determinado
$file="C:/AppServ/www/fichtec/pdf/5.pdf";
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($fp, 65536);
flush(); // this is essential for large downloads
}
fclose($fp);
echo"Descargando...";
?>
</body>
</html>



ya me asegure que en el archivo 5.pdf exista en la ruta y aun a si me aparecen los siguientes errores y simbolos!!!


Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\fichtec\descargarpdf.php:9) in C:\AppServ\www\fichtec\descargarpdf.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\fichtec\descargarpdf.php:9) in C:\AppServ\www\fichtec\descargarpdf.php on line 15

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\fichtec\descargarpdf.php:9) in C:\AppServ\www\fichtec\descargarpdf.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\fichtec\descargarpdf.php:9) in C:\AppServ\www\fichtec\descargarpdf.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\fichtec\descargarpdf.php:9) in C:\AppServ\www\fichtec\descargarpdf.php on line 18

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\fichtec\descargarpdf.php:9) in C:\AppServ\www\fichtec\descargarpdf.php on line 19
%PDF-1.3 %쏢 8 0 obj <> stream x˶mMR6H__)k{i@-.t0%TȲ^~!?O j̸}k*9uVP=gdd232ގKo!~7? fo\*>}[;.w?])77oO[K~O~~qf'l_e]ft+m^3H_޵g~u97i?I o9_ZާoOwߤv{? efS-?/Ɨ2~:?K#՟/?b櫿/7Ȭ5uK:ڂ;2ڻ1 =ˡr|Ƹ`\uɸq)_u{f̧| #_r yfSu̪3Ĥk$%"M*j\ DnuG 2}/o7zw#?%HX>%
00000 n 0000115880 00000 n 0000216454 00000 n 0000216306 00000 n 0000116003 00000 n 0000115528 00000 n 0000000015 00000 n 0000034635 00000 n 0000372910 00000 n 0000372705 00000 n 0000410385 00000 n 0000394471 00000 n 0000394252 00000 n 0000411950 00000 n 0000116085 00000 n 0000378963 00000 n 0000378749 00000 n 0000410620 00000 n 0000348276 00000 n 0000348067 00000 n 0000409867 00000 n 0000334214 00000 n 0000334007 00000 n 0000410174 00000 n 0000216168 00000 n 0000216198 00000 n 0000216230 00000 n 0000115712 00000 n 0000034656 00000 n 0000115506 00000 n 0000216601 00000 n 0000316684 00000 n 0000325286 00000 n 0000333888 00000 n 0000333942 00000 n 0000348045 00000 n 0000372683 00000 n 0000378728 00000 n 0000394230 00000 n 0000409845 00000 n 0000411793 00000 n 0000413127 00000 n trailer << /Size 44 /Root 1 0 R /Info 2 0 R >> startxref 413480 %%EOF Descargando...


si me pudieran ayudar a corregir estos errores de los agradecere!!!