Home  >  Article  >  Backend Development  >  Add watermark to image and upload with PHP

Add watermark to image and upload with PHP

WBOY
WBOYOriginal
2016-07-29 08:50:29882browse
0)
{
    $uploadfile = "./".time()."_".$_FILES['userfile']['name'];
    if (copy($_FILES['userfile']['tmp_name'], $uploadfile))
    {
        echo "OK
"; //文字水印 // imageWaterMark($uploadfile,9,"./trtt.png","www.NewXing.com",5,"#FF0000"); //图片水印 $waterImage="./shuiyin.png";//水印图片路径 imageWaterMark($uploadfile,0,$waterImage); echo ""; } else { echo "Fail
"; } } ?>
文件:

The above introduces how to add image watermarks to upload PHP, including image watermarking and PHP content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn