-
<?php
-
header ( "Content-type: text/html; charset=utf-8" );
-
date_default_timezone_set ( 'PRC' ); //设置中国时区
-
include 'PHPExcel.php';
-
$dir=dirname(__FILE__);
-
$filename = "/Users/jiangminghui/Documents/test/hantai/hantaipic.xlsx";
-
$objPHPExcel = PHPExcel_IOFactory::load($filename);//加载文件
-
$sheet = $objPHPExcel->getSheet(0);
-
$highestRow = $sheet->getHighestRow(); // 取得总行数
-
$highestColumn = $sheet->getHighestColumn(); // 取得总列数
-
$src_path1 = '111.png';
-
$src_path2 = '222.png';
-
$src1 = imagecreatefromstring(file_get_contents($src_path1));
-
$src2 = imagecreatefromstring(file_get_contents($src_path2));
-
list($src_w1,
PHP获取服务器图片并添加水印
最新推荐文章于 2021-08-24 10:47:23 发布
该PHP脚本从指定URL下载服务器上的图片,然后在每张图片上添加两个水印,最后将处理后的图片保存到本地。脚本使用PHPExcel库读取Excel表格数据,循环处理每行的图片链接,同时设置了时区为中国。
摘要由CSDN通过智能技术生成