
09/07/2009, 12:37
|
| | | Fecha de Ingreso: junio-2008
Mensajes: 50
Antigüedad: 18 años, 4 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í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*½ö9uVÈPƒªøÎÌ=gddÜ232×ÞŽKÊoÇù!~÷Ó7? øæýfûýÿðÍo\Éã*·Õß>}“[;.�Ðw‚Úùú?ß]›)ùí7ÿê¾ýá7éí÷¯ÿÿo®Oê[KÇ~O~û£ïó¯ÿá~qô¾£Ÿfï'l_˜e]·ftýÄþÂùŸãíŸ+õßüàm^Êù»3Hÿî§·_üÞµg×~¦u9òÛ÷þõ7i?I o9—£¿�£_ZûÞ§oþÁOüwßû·ß¤v™õÚà{¿÷Í?ø ûêefþ‡ŸŒÿðSü-‡?�ÿá/Æ—þ¥ýå2ä~:¶øËç?ôKšá#úÕŸÙÿ�/½?bôæ«¿ý‡±Éþì/ïí7öȬ5¯‚¾²uK:æÚ‚ßø;Å2Ú»1 =�Ë¡ãr|Ƹ—ëÛ`\Òu¤®Òë³É¸ü•“Óq)Âù_uœ{f¯Ì§|ë ¯±#_�÷rœã ¼ÿöyfSu̪Â3»ÑĤýë—åþk$ì%Âþë“"MÓø*j‹\‰êàŸ £ŸÿDÀãÄõ’�nÃ÷¶uÓ쿞G†¹½ÚÊß Ï2ü}ä/¾ÿo‡ç7¹ù‡¿zôwâ#Ç?Þ%ò÷ž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!!! |