$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);
}
//打开图片的函数
function open($path)
{
//判断文件是否存在
if(!file_exists($path))
{
exit('文件不存在');
}
函数名写错了,估计你要写的是 imagejpeg()