当前位置:Gxlcms > PHP教程 > php图片保存、上载

php图片保存、上载

时间:2021-07-01 10:21:17 帮助过:18人阅读

php图片保存、下载
输出图片
header("Content-type: image/gif");
echo $imgStr;

//弹出图片下载框
$filename = "1.jpg";//图片地址,可以绝对地址也可以相对地址
header("Content-Type: application/force-download");
header('Content-Disposition: attachment; filename="'.$filename.'"');
$img = file_get_contents($filename);
echo $img;
?

人气教程排行