Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/04/2006, 11:24
Avatar de uamistad
uamistad
 
Fecha de Ingreso: diciembre-2004
Ubicación: Cd. de México
Mensajes: 1.395
Antigüedad: 19 años, 4 meses
Puntos: 1
Intenta esto:
Código PHP:
<?
//con este código he conseguido descargar mi propio index.php

$filepath "index.php";
header("HTTP/1.1 200 OK"); //mandamos código de OK
header("Status: 200 OK"); //sirve para corregir un bug de IE (fuente: php.net)
header('Content-Type: text/php');
header('Content-Disposition: attachment; filename="'.$filepath.'"'); //
header('Content-Length: '.filesize($filepath));

//descargando...
readfile($filepath);
?>
Nota, debe haber algo más estándar, ya que ese "text/php" no existe (al menos no lo conocía yo), pero al menos funciona, jeje.
__________________
"Di no al Internet Explorer" -Proverbio Chino-