I need a simple script that will download a image file to the user's computer. However开发者_开发技巧, it is populated in a PHP file like this: mydomain.com/image.php?id=234234
so I can't use it in download scripts that do it like this: downloadfile.php?filename=images/1321.jpg
.
What's my best option?
Thanks,
CoultonI'm guessing you want the download script to send out a real filename so it'll get saved as "1321.jpg" on the user's computer, and not "234234".
That's accomplished via the Content-disposition HTTP Header:
Content-disposition: attachment; filename="234234.jpg"
精彩评论