phew 0 Denunciar post Postado Junho 28, 2007 Quero que o usuario ao clicar no link seja forçado a baixar o flash ao invez de visualizar. O problema é que fiz um codigo e ele só nao funciona no I.E7 tem alguma maneira de arrumar isso? $filepath = $_GET['arquivo'];$filename = $_GET['arquivo'];Header( "Content-Type: application/octet-stream" );Header( "Content-Length:" . filesize( $filepath ) );Header( "Content-Disposition: attatchment; filename=$filename" );readfile( $filepath ); Compartilhar este post Link para o post Compartilhar em outros sites
Anderson Mello 3 Denunciar post Postado Junho 28, 2007 Tente com: header("Content-Type: application/save");header("Content-Length:" . filesize($filepath));header("Content-Disposition: attatchment; filename=$filename");header("Expires: 0");header("Pragma: no-cache");readfile($filepath); []s Anderson Mello Compartilhar este post Link para o post Compartilhar em outros sites
PedroS 0 Denunciar post Postado Junho 28, 2007 Vlw por responder, porém continua a mesma coisa no I.E, ele tenta carregar o flash ao invez de forçar o download. Compartilhar este post Link para o post Compartilhar em outros sites
slipce 0 Denunciar post Postado Junho 28, 2007 $fpath = $_GET[ 'file' ]; $fsize = filesize( $fpath ); $bufsize = 20000; header('HTTP/1.1 200 OK'); header('Status: 200 OK'); header('Accept-Ranges: bytes'); header('Content-Transfer-Encoding: Binary'); header('Content-Type: image/jpg'); header("Content-Length: $fsize"); header('Content-Type: application/force-download'); header("Content-Disposition: inline; filename=".basename( $fpath ) ); if(file_exists( $fpath ) && $fh = fopen( $fpath, "rb" )){ while( $buf = fread( $fh, $bufsize )) print $buf; fclose( $fh ); }else { header("HTTP/1.1 404 Not Found"); } Tenta usar esse script, não tenho certeza se funcionar no ie7. Compartilhar este post Link para o post Compartilhar em outros sites