![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
17/02/2012, 13:30
|
| | Fecha de Ingreso: noviembre-2010
Mensajes: 13
Antigüedad: 14 años, 2 meses Puntos: 0 | |
Respuesta: Tengo mis archivos en una carpeta el nombre de ese archivo lo guarde con e Che muchas gracias, de todos modos no logro hacerlo.
<td>ARCHIVO ADJUNTO</td>
<?php // CAPTURO LOS DATOS...
while($fila=mysql_fetch_array($res)){
?>
<td><?php echo $fila['fichero'];?></td>
y me trae...
NOMBRE ARCHIVO ADJUNTO
juan perez uploads/Jellyfish.pdf
MARIA PAZ uploads/Penguins.doc
Pero no logro incorporar esto....
<?php
$fichero = 'mono.gif';
if (file_exists($fichero)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($fichero));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($fichero));
ob_clean();
flush();
readfile($fichero);
exit;
}
?> |