Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/02/2006, 08:48
temetotoelwebo
 
Fecha de Ingreso: mayo-2005
Mensajes: 23
Antigüedad: 18 años, 10 meses
Puntos: 0
Muchas gracias por tu ayuda, he probado esto y no me funciona. El codigo es este, si tiene algun error por favor digamelo:

Código PHP:
<?php
require_once($_SERVER["DOCUMENT_ROOT"]."/funciones.php");
if(
$id_usuario){
if(
$id_usuario!=1){
mysql_query("update descargas set descargado=descargado+1 where id='$id'");
}
$result=mysql_query("select * from descargas where id=$id limit 1");
$row=mysql_fetch_array($result);
    


$enlace=$row["direccion"];
header ("Content-Disposition: attachment; filename=descarga_".$enlace."\n\n");
header ("Content-Type: application/octet-stream");
header ("Content-Length: ".filesize($enlace));
readfile($enlace);




}else{
    
header("location: /mensajes.php?id=9");
}
?>

Última edición por temetotoelwebo; 19/02/2006 a las 12:28