ALL :: ZONES :: save as.. different under Windows <-> Mac |
|||
| By: delphiheaven |
Date: 04/02/2003 00:00:00 |
Points: 50 | Status: Answered Quality : Excellent |
|
Hello, I have a small problem. I have a PHP script which allows me to download resized (on the fly) pictures from my website. The file is "convertandsave.php" When I then right-click on the picture which is shown in the browser, in the save as... dialog automatically appears the name of the picture, for example "xyz123.jpg". But not under Macintosh..Here appears under save as... the name of the php file, "convertandsave.php". How can I change this so that also under Mac there appears automatically the name of the picture? |
|||
| By: RQuadling | Date: 04/02/2003 21:07:00 | Type : Answer |
|
| In your script convertandsave.php, make sure you have ... Header("Content-Disposition: attachment; Filename=xyz123.jpg"); e.g. Header("Content-Type: audio/mpeg"); Header("Accept-Ranges: bytes"); $filebits = explode("/",$filename); Header("Content-Disposition: attachment; Filename=" . end($filebits)); $iLength = @readfile($filename); Richard. |
|||
| By: VGR | Date: 04/02/2003 21:49:00 | Type : Assist |
|
| heuuuuu yes, but with image/jpeg, not audio/mpeg ;-)) |
|||
| By: RQuadling | Date: 04/02/2003 21:57:00 | Type : Comment |
|
| Yes. My code is from my anti-leech script for mp3s only. Sorry about the confusion. But I assumed delphiheaven was already using a header. Richard. |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








