Posted by Obi on 03/02/07 16:12
Jim Carlock wrote:
> "Obi" posted...
> : I have a problem during download file with Internet Explorer 6.
>
> Internet Explorer is a BIG problem. over 90% of the world
> uses it.
>
> : I use this script:
> :
> : header('Pragma: public');
> : header('Expires: 0');
> : header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
> : header('Content-Type: application/octet-stream');
> : //header('Content-Type: application/force-download');
> : header('Content-Disposition: attachment; filename="'.$filename.'"');
> : header('Content-Transfer-Encoding: binary');
> : header('Content-Length: ' . filesize($dfile));
>
> Try taking out the // line? Did you check to see which headers
> actually get sent to the client?
>
> And are $filename and $dfile the same file?
>
> : This opens a dialog box asking if open or save a file named
> : 'index.php' (not the proper file).
>
> echo("filename == " . $filename . "<br />");
> echo("dfile == " . $dfile . "<br />");
>
> It sounds like the server is delivering the wrong header for
> an index.php file, so perhaps the variable $filename is an
> empty string?
>
$filename is onle the name of file
$dfile is the relative path of file on the server
The big problem is, on my computer the script works fine.
On my customer computers, doesn' t works.
any ideas?
[Back to original message]
|