Firefox vs. IE
Publicado por Aritz (4 intervenciones) el 15/03/2007 17:02:33
Tengo un script para descargar ficheros desde el servidor que en Firefox me funciona y no en IE. La cosa es que por más que busco en Internet y le doy vueltas al asunto no encuentro cuál puede ser el problema. Agrazco todo tipo de ayudas.
El código es el siguiente:
pruebaDownload.php
<?
function Descargar($ElFichero)
{
$TheFile = basename($ElFichero);
header( "Content-Type: application/octet-stream");
header( "Content-Length: ".filesize($ElFichero));
header( "Content-Disposition: attachment; filename=".$TheFile."");
readfile($ElFichero);
}
Descargar("/ram/Files/backup.txt");
?>
llamaApruebaDownload.html
<a href='http://ServerIP/PHP/pruebaDownload.php' title='Descagar Fichero'><input type='button' value=Download file'></a>
**También he puesto el input dentro de form...
El código es el siguiente:
pruebaDownload.php
<?
function Descargar($ElFichero)
{
$TheFile = basename($ElFichero);
header( "Content-Type: application/octet-stream");
header( "Content-Length: ".filesize($ElFichero));
header( "Content-Disposition: attachment; filename=".$TheFile."");
readfile($ElFichero);
}
Descargar("/ram/Files/backup.txt");
?>
llamaApruebaDownload.html
<a href='http://ServerIP/PHP/pruebaDownload.php' title='Descagar Fichero'><input type='button' value=Download file'></a>
**También he puesto el input dentro de form...
Valora esta pregunta


0