Código PHP:
<a href="download.php?archivo=<?php echo $ruta . $nombre_archivo;?>"><?php echo $nombre_archivo;?></a>
Código PHP:
<?php
if (isset ($_GET['archivo'] && !is_null ($_GET["archivo"]))
{
header ("Content-Transfer-Encoding: binary");
header ("Content-type: application/force-download");
header ("Content-Disposition: attachment; filename=" . basename ($_GET["archivo"]));
header ("Content-Length: " . filesize ($_GET["archivo"]));
readfile ($_GET["archivo"]);
}
else
header ("Location: index.php");
?>
¿Alguien sabría que es lo que me falla o cómo podría solventar este desafortunado percance?
Muchas gracias por adelantado...