最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
phpcms v9删除上传图片自动添加水印功能
时间:2022-06-25 16:22:58 编辑:袖梨 来源:一聚教程网
https://img.111cn.net去除https://img.111cn.netflashhttps://img.111cn.netupload网络https://img.111cn.net文件上传https://img.111cn.net选项及去掉自动添加水印功能https://img.111cn.nethttps://img.111cn.net
https://img.111cn.net第一步:修改wwwroot\phpcms\modules\attachment\templates\swfupload.tpl.phphttps://img.111cn.net
https://img.111cn.net代码如下https://img.111cn.net | https://img.111cn.net复制代码https://img.111cn.net | https://img.111cn.net
https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net
https://img.111cn.nethttps://img.111cn.net
https://img.111cn.net //删除以下https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.netadmin_username && $_SESSION['userid']) {?>https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net,https://img.111cn.net https://img.111cn.nethttps://img.111cn.nethttps://img.111cn.nethttps://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.nethttps://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net//删除下面的水印https://img.111cn.net https://img.111cn.netcheckboxhttps://img.111cn.net" id="watermark_enable" value="1" https://img.111cn.net onclick="change_params()"> https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.netadmin_username && $_SESSION['userid']) {?>https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.net https://img.111cn.net https://img.111cn.nethttps://img.111cn.nethttps://img.111cn.net https://img.111cn.net |
https://img.111cn.net
https://img.111cn.net补充:彻底去除自带的水印功能https://img.111cn.nethttps://img.111cn.net
https://img.111cn.net第一步:找到statics/images/water 文件夹,将去删除;如果系统找不到water文件夹的水印图片,则将会执行第二步,给图片添加一个文本格式的水印https://img.111cn.net
https://img.111cn.net第二步:找到phpcms/libs/classes/image.class.php文件中watermark函数,将此函数中$w_text 参数的值设置为空即可https://img.111cn.net
https://img.111cn.net代码如下https://img.111cn.net | https://img.111cn.net复制代码https://img.111cn.net | https://img.111cn.net
https://img.111cn.net function watermark($source, $target = '', $w_pos = '', $w_img = '', $w_text = '',$w_font = 8, $w_color = '#ff0000') {https://img.111cn.net https://img.111cn.net$w_pos = $w_pos ? $w_pos : $this->w_pos;https://img.111cn.net https://img.111cn.net$w_img = $w_img ? $w_img : $this->w_img;https://img.111cn.net https://img.111cn.netif(!$this->watermark_enable || !$this->check($source)) return false;https://img.111cn.net https://img.111cn.netif(!$target) $target = $source;https://img.111cn.net https://img.111cn.net$w_img = PHPCMS_PATH.$w_img;https://img.111cn.net https://img.111cn.net$source_info = getimagesize($source);https://img.111cn.net https://img.111cn.net$source_w = $source_info[0];https://img.111cn.net https://img.111cn.net$source_h = $source_info[1];https://img.111cn.net https://img.111cn.net |
https://img.111cn.net
如果想替换为自己设计的水印图片,则只需要替换statics/images/water文件夹下的水印图片为自己设计的水印图片即可。https://img.111cn.net
https://img.111cn.net如果想给自己上传的图片添加文本格式的水印,则除了需要删除statics/images/water文件夹外,还需要将watermark函数中的$w_text参数的值修改为自己想要的文字即可。https://img.111cn.net
https://img.111cn.net https://img.111cn.net https://img.111cn.net相关文章
- 《无限暖暖》天星之羽获得位置介绍 12-20
- 《流放之路2》重铸台解锁方法介绍 12-20
- 《无限暖暖》瞄准那个亮亮的成就怎么做 12-20
- 《无限暖暖》魔气怪终结者完成方法 12-20
- 《无限暖暖》曙光毛团获得位置介绍 12-20
- 《无限暖暖》日光果获得位置介绍 12-20