Ver Mensaje Individual
  #9 (permalink)  
Antiguo 05/04/2010, 10:33
Avatar de towel
towel
 
Fecha de Ingreso: marzo-2009
Mensajes: 101
Antigüedad: 15 años, 2 meses
Puntos: 0
Respuesta: header para IE

pues chicos he buscado con los header asi como me dijeron y no funciona miren el codigo que utilizo ahora simplemente cuando le doy click al boton para abrir la ventana emergente se abre y al instante se cierra con el IE alguna otra idea ???? disculpen las molestias
Cita:
if (!isset($_GET['nombreD']) || empty($_GET['nombreD']))
{
exit();
}
$root = "/web/otbvideo/HTML_dowload/download_video/";
$file = $_GET['nombreD'];
$path = $root.$file;
$type = '';
if (is_file($path)) {
$size = filesize($path);
if (function_exists('mime_content_type'))
{
/*$path = basename($path);
echo $hola = mime_content_type("php.gif");
echo $hola2 = mime_content_type('test.php');
echo "resultado = ".$type = mime_content_type($path);*/
$type ="video/x-ms-wmv";
}
else if (function_exists('finfo_file'))
{
echo "hola2";
$info = finfo_open(FILEINFO_MIME);
$type = finfo_file($info, $path);
finfo_close($info);
}
if ($type == '') {
$type = "application/force-download";
}
// Set Headers
header("Content-Type: $type");
header("Content-Disposition: attachment; filename=$file");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . $size);
// Download File
readfile($path);
}
else
{
die("File not exist !!");
}