$func = 'image'.$type;
//处理path路径 是否启用随机文件名
if($isRanName)
{
$name = uniqid().'.'.$type;
}else{
$pathinfo = pathinfo($soruce);
//var_dump($pathinfo);
$name = $pathinfo['filename'].'.'.$type;
}
$path = rtrim($path,'/').'/'.$name;
$func($soruceRes,$path);
imagedestroy($soruceRes);
imagedestroy($waterRes);
}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
$func = 'image'.$type;
$func($soruceRes,$path);
$func是动态拼接的函数名。