Action::error PHP Method

error() protected method

操作错误跳转的快捷方
protected error ( string $message, boolean $ajax = false ) : voi
$message string 错误信息
$ajax boolean 是否为Ajax方
return voi
    protected function error($message, $ajax = false)
    {
        Addons::hook('core_filter_error_message', $message);
        $this->_dispatch_jump($message, 0, $ajax);
    }

Usage Example

コード例 #1
0
ファイル: BaseAction.class.php プロジェクト: xcdxcd/zhongchou
 protected function error($message, $ajax = 0)
 {
     if (!$this->get("jumpUrl")) {
         if ($_SERVER["HTTP_REFERER"]) {
             $default_jump = $_SERVER["HTTP_REFERER"];
         } else {
             $default_jump = u("Index/main");
         }
         $this->assign("jumpUrl", $default_jump);
     }
     parent::error($message, $ajax);
 }
All Usage Examples Of Action::error