コード例 #1
0
ファイル: SiteAction.class.php プロジェクト: chenyongze/m3d
 /**
  * 添加测试环境
  */
 private function addSite()
 {
     $data = array('siteName' => $_POST['siteName'], 'description' => $_POST['description'], 'author' => isset($_POST['author']) ? $_POST['author'] : 'M3D', 'modules' => $_POST['modules']);
     $model = new SiteModel();
     if ($model->addSite($data)) {
         show_json('新建环境成功!', 200);
     } else {
         show_error('新建环境失败!');
     }
     // 添加环境后,重启服务器
     Tool::restartServer();
 }