PHP code example of zzyc-supply / download-zip

1. Go to this page and download the library: Download zzyc-supply/download-zip library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zzyc-supply / download-zip example snippets

    

	/**
     * Created by PhpStorm.
     * User: Zzyc
     * Date: 2022/4/17
     * Time: 2:04 PM
     */
    
    use Zzyc\Zip\zipTool;

    /**
     * 为图像添加图片水印
     *
     * @param 参数1 原图
     * @param 参数2 需要添加的水印图片
     * @param 参数3 要添加的位置,默认是0,有10个位置可选(0,1,2,3,4,5,6,7,8,9)
     * @param 参数4 透明度 默认100
     * @param 参数5 增加完水印的图片的前缀
     * @param 参数6 是否保存图片(0-》保存,1-》浏览器输出)
     */
    $imgTool1 = new zipTool('examples/water/');
    $image1 = '/examples/imgs/123456.jpg';
    $waterImg = '/examples/imgs/water.png';
	echo $imgTool1->addWater($image1,$waterImg,0,100,'water_',0);