图像下载按钮PHP [英] Image Download button PHP

查看:89
本文介绍了图像下载按钮PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个位图图像数据存储在变量中,我需要提供一个按钮来下载这个图像到用户文件系统..,因为图像没有直接链接怎么办?

Hi i have a bitmap image data stored in a variable , i need to provide a button to download this image to users file system .. , as there is no direct link for the image how to do it ?

推荐答案

链接到执行此操作的PHP脚本:

Link to a PHP script that does this:

header("Content-type: image/bmp");
header("Content-disposition: attachment; filename='image.bmp'");
echo $variable_containing_bitmap;

这篇关于图像下载按钮PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆