public function actionDoadd() { $time = new Time(); $time->t_name = $_POST['t_name']; if ($time->save()) { echo $this->success("添加成功", "index.php?r=time", '1'); } else { echo $this->error("添加失败", "index.php?r=time", '1'); } }