![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
09/06/2009, 10:24
|
| | Fecha de Ingreso: mayo-2009
Mensajes: 74
Antigüedad: 15 años, 9 meses Puntos: 0 | |
Respuesta: descarga archivos desde mi web gracias por tu respuesta GatorV
ya quite ese echo y ahora va otra vez pero no se descarga el archivo deseado ,me saca el cuadro del dialogo con el nombre exacto del archivo ,pero cuando lo abro hay un log de fallos.
descarga4.php
************
<?php
$release=$_GET['release'];
header ("Content-Disposition: attachment; filename=".$release." ");
header ("Content-Type: application/octet-stream");
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/download");
header("Content-Transfer-Encoding: binary ");
readfile("./htdocs/$release");
?>
<!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>Error al descargar el archivo</title>
</head>
<body>
<p>No se ha podido descargar el archivo</p>
</body>
</html>
***************************************
todos los archivos los tengo en /xampp/htdocs
el contenido del archivo descargado(contaplus_basico_ayuda.txt):
************************************************** ****
<br />
<b>Warning</b>: readfile(./htdocs/contaplus_basico_ayuda.txt) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: No such file or directory in <b>C:\xampp\htdocs\descarga4.php</b> on line <b>13</b><br />
<!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>Error al descargar el archivo</title>
</head>
<body>
<p>No se ha podido descargar el archivo</p>
</body>
</html>
******************************** |