Tengo este codigo
Código:
Pero no consigo que descarge los ficheros. Se me abre una ventana del navegador y un monton de caracteres ilegibles<? session_start(); include ("includes/seguridad.php"); require("../privado/php/configuracion.php"); $ref=$_GET["ref"]; $SQL="SELECT Archivo FROM apuntes WHERE Referencia='$ref'"; $con=mysql_query($SQL) or die (mysql_error()); $referencia=mysql_fetch_array($con); $enlace = "../privado/docs/".$referencia ["Archivo"]; header ("Content-Disposition: attachment; filename=".$referencia ["Archivo"]."\n\n"); header ("Content-Type: application/octet-stream"); header ("Content-Length: ".filesize($enlace)); readfile($enlace); ?>
¿Ayuda?