聯系官方銷售客服
1835022288
028-61286886
判斷后前臺沒有顯示 _msg的提示, 代碼寫在控制器的
前臺只是執行了效果
代碼:
public function index() { //接收數據 $post_id = \Phpcmf\Service::L('input')->post('post_id'); //內容id $post_title = \Phpcmf\Service::L('input')->post('post_title'); //內容標題 $post_mbrid = \Phpcmf\Service::L('input')->post('post_mbrid'); //會員id $post_inputtime = SYS_TIME; //當前時間 //變量為空 if(empty($post_id) && empty($post_title) && empty($post_mbrid)){ return $this->_msg(0,'非法操作'); } $rt = \Phpcmf\Service::M()->db->table('member_dowlog')->insert([ 'cid' => $post_id, 'title' => $post_title, 'uid' => $post_mbrid, 'inputtime' => $post_inputtime, ]); if($rt['code']){ return $this->_msg(1,'操作成功!'); }else{ return $this->_msg(0,'操作失敗!'); } }
這個寫法很標準,沒有任何問題的
回復@官方研發技術-羅老師
不知道為啥 下面的判斷沒跳轉 msg 頁面