<?php
//本地保存
$spath = "D:\\phpstudy_pro\\WWW\\mblogb\\storage/images/xxxx.png";
$extends = pathinfo($spath)['extension'];
//动态的把图片导入内存中
$fun = "imagecreatefrom{$extends}";
$image = $fun($spath);
//指定字体颜色white
$col = imagecolorallocatealpha($image,255,255,255,50);
//指定字体内容
$content = "8888";
//给图片添加文字
imagestring($image,5,8,8,$content,$col);
//保存图片
$func = "image{$extends}";
$func($image,$spath);
//销毁图片
imagedestroy($image);
05-31
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交