$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);
}