Hi - All db users read this !!

I know it download it twice because in Netscape it take half of the time and
also I see it start in the left bottom bar.

I read that IE first read the headers fully ( including the file ) and then
ask it again for opening.
While Netscape read the file only once.

Any ideas ?
If I download from db twice while using IE means that all php servers that
serve file from phtml cause the same problem, and that's  a Major Problem :(

Every one in the list that use db to store files should try to download the
files with IE and Mozilla while measuring the time its take !!!

Ill probably open a bug if no one will have idea how to disable double
reading of the file or how to guess when IE read the headers and when its
reading the file itself.

> How do you know it downloads them twice?  What are you seeing?
>
> Also, if you want it downloaded, Content-type should be
> application/octet-stream.  Perhaps that's causing the browser snag it and
> try to display it on top of the download...  Sounds like how MS would code
> it.
>
> > Hi All
> >
> > I store files on MYSQL server but when I try to pull them out ( show
them
> on
> > screen or download ) with IE it download them twice before showing them
up
> > :(
> >
> > I played with the headers (adding, removing) with no success.
> > by the way in Netscape its work fine.
> >
> > here is the last code tried:
> >
> > <?
> > $query =  "select * from files where issue_id='$id'";
> > $result = mysql_query ($query)
> >  or die ("Invalid query");
> >
> >  $data = @MYSQL_RESULT($result,0, "file_data");
> >  $type = @MYSQL_RESULT($result,0, "file_type");
> >  $file_name = @MYSQL_RESULT($result,0, "file_name");
> >  $file_size = @MYSQL_RESULT($result,0, "file_size");
> >
> >  // # To force save file
> >  file://header("Content-disposition: attachment;
> filename=\"$file_name\"");
> >
> >  Header("Content-type: $type");
> >  header("Content-Length: $file_size");
> >  header("Content-Disposition: inline; filename=$file_name");
> >
> >  echo $data;
> > ?>
> >
> > --------------------------
> > Canaan Surfing Ltd.
> > Internet Service Providers
> > Ben-Nes Michael - Manager
> > Tel: 972-4-6991122
> > http://sites.canaan.co.il
> > --------------------------



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to