request->isPost()) exit(); if(isset($_POST['payload']) && $_POST['payload']){ $payload = json_decode($_POST['payload'],true); $name = $payload['repository']['name']; if(is_dir('/home/www/'.$name)){ system('cd /home/www/'.$name.';git pull',$return); }else{ $repo = $payload['repository']['ssh_url']; system('cd /home/www;git clone '.$repo.';git pull',$return); } return '请求成功'; } return '请求错误'; } public function show404Action(){ return 'UNKNOWN REQUEST'; } }