21,887
社区成员
发帖
与我相关
我的任务
分享
// 保存的位置
$file = "/image/hello.png"
imagepng($dstimage, $file);
/** 打开输出缓冲 **/
ob_start();
/** 输出图像 **/
imagepng($dstimage);
/** 获取缓冲区内容 **/
$img = ob_get_contents();
/** 清空输出缓冲 **/
ob_end_clean();
/** 然后把$img保存到文件就行了 **/