Re: IE Download twice from DB

From: Date: Thu, 09 Aug 2001 19:42:16 +0000
Subject: Re: IE Download twice from DB
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62074@lists.php.net to get a copy of this message
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. -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Ben-Nes Michael <miki@canaan.co.il> Newsgroups: php.general To: <php-general@lists.php.net> Sent: Thursday, August 09, 2001 6:41 AM Subject: IE Download twice from DB > 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 > -------------------------- > >

« previous php.general (#62074) next »