Re: download prompt not woking on macintosh

From: Date: Fri, 16 Feb 2001 01:01:48 +0000
Subject: Re: download prompt not woking on macintosh
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40040@lists.php.net to get a copy of this message
In addition to every header you can find, use: http://yoursite.com/download.php/foo.jpg?download=foo.jpg Yes, that extra foo.jpg looks real goofy in there. PHP will ignore it. Your web-server will ignore it. Only really badly broken software products (IE) will say, "Hey, let's *ignore* all those standards and stuff, and use the URL to decide what to call the file. Yeah, that's a good idea!" -- Visit the Zend Store at http://www.zend.com/store/ 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: Sebastian Stadtlich <Stadtlich@mediaworx.com> Newsgroups: php.general Sent: Wednesday, February 14, 2001 6:04 AM Subject: [PHP] download prompt not woking on macintosh > Hi all > > I tried to build a script that displays the 'save-file dialog', because the > files that should be downloaded > are huge 32bit jpeg for printing. the problem is that it works in IE on PC, > Netscape on PC and MAC, but > not in IE on a MAC. the files are jpeg, IE on Mac either tried to open the > files ( which does not work, > because they are CYMK), or displayes the filename 'download.php' in the save > dialog .... > PLEASE HELP!!!! our designers can't be the only persons to use Mac on the > world... > i tried everycombination of the following headers, but without success... > > thanks > sebastian > > code : > > /* > header("Content-Type: application/octet-stream"); > header("Content-Disposition: inline; > filename=\"".basename($download)."\""); > set_time_limit(0); > readfile($download) or die ("File nicht gefunden oder sonstiger > Fehler aufgetreten."); > */ > > header("Content-Type: application/download\n"); > header("Content-Disposition: inline; filename=\"$download\""); > set_time_limit(0); > readfile($download); > /* > > header("Content-Type: application/download\n"); > header("Content-Disposition: attachment; filename=\"$download\""); > $fn=fopen("$download" , "r"); > fpassthru($fn); > */ > /* > header("Content-Type: doesn/matter\r\n"); > header("Content-Disposition: filename=$download\r\n\r\n"); > header("Content-Transfer-Encoding: binary\r\n"); > readfile($download) or die ("File nicht gefunden oder sonstiger > Fehler aufgetreten."); > */ > /* > header("Content-Type: doesn/matter\r\n"); > header("Content-Disposition: filename=$download"); > header("Content-Transfer-Encoding: binary\r\n"); > header("Content-Length: ".filesize($download)); > readfile($download); > */ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#40040) next »