Home > Article > CMS Tutorial > Why not set watermark in phpcms
How to not set a watermark in phpcms: first find the water folder and delete it; then find the watermark function in the "image.class.php" file; finally add the "$w_text" parameter to this function Just set the value to empty.
phpcms does not set a watermark
Step one: Find the statics/images/water folder and delete it ;If the system cannot find the watermark image in the water folder, it will perform the second step to add a watermark in text format to the image
Step 2: Find phpcms/libs/classes/image.class. For the watermark function in the php file, set the value of the $w_text parameter in this function to empty
function watermark($source, $target = '', $w_pos = '', $w_img = '', $w_text = '',$w_font = 8, $w_color = '#ff0000') { $w_pos = $w_pos ? $w_pos : $this->w_pos; $w_img = $w_img ? $w_img : $this->w_img; if(!$this->watermark_enable || !$this->check($source)) return false; if(!$target) $target = $source; $w_img = PHPCMS_PATH.$w_img; $source_info = getimagesize($source); $source_w = $source_info[0]; $source_h = $source_info[1];
If you want to replace it with a watermark image of your own design, you only need to replace statics/images The watermark image in the /water folder can be the watermark image designed by yourself.
If you want to add a watermark in text format to the pictures you upload, in addition to deleting the statics/images/water folder, you also need to change the value of the $w_text parameter in the watermark function to what you want. Just text.
Recommended: "phpcms tutorial"
The above is the detailed content of Why not set watermark in phpcms. For more information, please follow other related articles on the PHP Chinese website!