he puesto la posibilidad de descargar archivos en una web, y me gustaría saber si es segura:
Código HTML:
Ver original
<a href="http://www.nombredelaweb.com/ruta/descarga.php?archivo=<%=archivos[j][2]%>&ubicar=correou"><%=archivos[j][2]%></a>
Código PHP:
Ver original
<?php { } $ubicar = $_GET['ubicar']; $root = BASE_IMAG.DIRECTORY_SEPARATOR.$ubicar.DIRECTORY_SEPARATOR; $path = $root.$file; $type = ''; { { } { } if ($type == '') { $type = "application/force-download"; } // Definir headers // Descargar archivo } else { } ?>
un saludo.