修改hook的post-commit.tml 为post-commitvi post-commit 编辑添加下面命令/usr/bin/svn update --username carshop --password 235604aa /www/wwwroot/api.com
//合并两个一维数组，去掉重复元素 function arraymerge($arr1=array(),$arr2=array(),$returnarr=array()){ if(!empty($arr1) && is_array($arr1)){ foreach($arr1 as $key=>$val){ $returnarr[] = $val; } } if(!empty($arr2) && is_array($arr2)){ if(!empty($returnarr)){ foreach($arr2 as $k=>$v){ $flag = false; foreach($returnarr as $ke=>$va){ if($va == $v){ $flag = true; } } if(!$flag){ $returnarr[] = $v; } } }else{ if(!empty($arr2) && is_array($arr2)){ foreach($arr2 as $key2=>$val2){ $returnarr[] = $val2; } } } } return $returnarr; }