当前位置: 首页>>代码示例>>PHP>>正文


PHP Record::note方法代码示例

本文整理汇总了PHP中Record::note方法的典型用法代码示例。如果您正苦于以下问题:PHP Record::note方法的具体用法?PHP Record::note怎么用?PHP Record::note使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Record的用法示例。


在下文中一共展示了Record::note方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $sid = F::i('Cookie')->get('sid');
     $ip = $_SERVER['REMOTE_ADDR'];
     $check = FALSE;
     try {
         $check = $this->checkSid($sid);
     } catch (BadSIDException $e) {
         // Hacking attempt... Say no and log !
         $check = FALSE;
         Record::note($e->__toString());
     } catch (NullSIDException $e) {
         // Nothing important...
         $check = FALSE;
     }
     // If DatabaseException is raised, it's more important, let it throws !
     // If Check return FALSE, sid is incorrect !
     if (!$check) {
         // Create a new session
         // 0.00000000000000000000000000000000000000001
         // chance of having 2 sessions with the same id !
         // I hope never happen
         $sid = $this->generateID();
         $this->mid = _ID_VISITOR;
         // Register it
         F::i(_DBMS_SYS)->exec('INSERT INTO !prefix_sessions (s_id, m_id, v_ip, s_date) VALUES (?, ?, ?, NOW())', array($sid, $this->mid, ip2long($ip)));
     } else {
         // Update it
         F::i(_DBMS_SYS)->exec('UPDATE !prefix_sessions SET s_date=NOW() WHERE s_id = ?', array($sid));
         $result = F::i(_DBMS_SYS)->query('SELECT m.m_id, m.m_auth FROM !prefix_sessions s, !prefix_members m WHERE m.m_id = s.m_id AND s.s_id = ?', array($sid));
         $obj = $result->getObject();
         if ($obj !== NULL) {
             $this->mid = intval($obj->m_id);
             $this->auth = intval($obj->m_auth);
         }
     }
     $this->setSID($sid);
 }
开发者ID:Korko,项目名称:RiskOnline,代码行数:39,代码来源:Session.php

示例2: handlerError

 public static function handlerError($errno, $errstr, $errfile, $errline)
 {
     $errnum = NULL;
     switch ($errno) {
         case E_NOTICE:
         case E_USER_NOTICE:
         case E_STRICT:
             $message = Tools::generateErrorMessage($errno, $errstr, $errfile, $errline, 'Notice: ');
             break;
         case E_WARNING:
         case E_USER_WARNING:
             $message = Tools::generateErrorMessage($errno, $errstr, $errfile, $errline, 'Warning: ');
             break;
         case E_DEPRECATED:
         case E_USER_DEPRECATED:
             $message = Tools::generateErrorMessage($errno, $errstr, $errfile, $errline, 'Deprecated: ');
             break;
         case E_USER_ERROR:
         case E_RECOVERABLE_ERROR:
             $message = Tools::generateErrorMessage($errno, $errstr, $errfile, $errline, 'Error: ');
             $errnum = Record::note($message);
             break;
         default:
             $message = Tools::generateErrorMessage($errno, $errstr, $errfile, $errline, 'Unknown ' . $errno . ': ');
             $errnum = Record::note($message);
     }
     if (!is_null($errnum)) {
         die('Error n° ' . $errnum);
     }
     // Show the name of the file
     if (_DEBUG) {
         echo $message;
     }
     return TRUE;
     // Ok PHP ! We manage successfully this error, do not manage it again
 }
开发者ID:Korko,项目名称:RiskOnline,代码行数:36,代码来源:Tools.php

示例3: ob_end_clean

        exit;
    }
    F::i('Session')->close();
    $output = Tools::parseOutput($output);
    if (!_DEBUG) {
        ob_end_clean();
    }
} catch (DatabaseException $e) {
    Record::note($e->__toString());
    die('DB Error : ' . $e->getMessage());
} catch (SessionException $e) {
    // Hacking attempt
    Record::note($e->__toString());
    die('Hacking Attempt : ' . $e->getMessage());
} catch (ControllerException $e) {
    // Bad Access
    Record::note($e->__toString());
    die('Bad Access : ' . $e->getMessage());
} catch (ModelException $e) {
    // Error while generating
    Record::note($e->__toString());
    die('Error while generating : ' . $e->getMessage());
} catch (ViewException $e) {
    // Error while displaying
    Record::note($e->__toString());
    die('Error while displaying : ' . $e->getMessage());
} catch (Exception $e) {
    // Unexpected Exception so STOP !
    trigger_error('Unexcepted Exception : ' . $e->__toString(), E_USER_ERROR);
}
echo $output;
开发者ID:Korko,项目名称:RiskOnline,代码行数:31,代码来源:index.php


注:本文中的Record::note方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。