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


PHP Trace::add_trace方法代码示例

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


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

示例1: __construct

 function __construct($conf)
 {
     Trace::add_trace('construct class', __METHOD__);
     self::$conf = $conf;
     self::$conn = new DB($conf);
     $this->Func = new Func();
 }
开发者ID:shlomohass,项目名称:IID,代码行数:7,代码来源:Basic.class.php

示例2: load

 /** Load Dictionary
  * 
  * @param Array $load - Dictionary array 
  * 
  */
 public static function load($load)
 {
     Trace::add_trace('construct class', __METHOD__);
     self::$dic = isset($load['dic']) ? $load['dic'] : array();
     self::$hooks = isset($load['js']) ? $load['js'] : array();
     self::$lang = isset($load['lang']) ? $load['lang'] : array();
 }
开发者ID:shlomohass,项目名称:IID,代码行数:12,代码来源:Lang.class.php

示例3: generate_login_session

 /** Generate login session token
  * 
  * @param string $pass
  * @return string
  */
 public function generate_login_session($pass)
 {
     Trace::add_trace('generate login session request', __METHOD__);
     return md5($pass . date("Y-m-d H:i:s"));
 }
开发者ID:shlomohass,项目名称:MidataControl,代码行数:10,代码来源:User.class.php

示例4: target

 /** Set page target name 
  * 
  * @return boolean
  */
 public function target()
 {
     Trace::add_trace('get page target', __METHOD__);
     $target = $this->Func->filter_var(filter_input(INPUT_GET, 'page'));
     if (!is_null($target) && $target) {
         $this->target = $target;
         return true;
     }
     $this->target = false;
     return false;
 }
开发者ID:shlomohass,项目名称:MidataControl,代码行数:15,代码来源:Page.class.php

示例5: array

/************************* Page Target and token ******************************/
Trace::add_step(__FILE__, "Set Target and Page Token");
$Page->target();
if ($User->user_loged) {
    $Page->token = $User->sess_save["sess"];
}
Trace::add_trace("Page parsed target", __FILE__, array("target" => $Page->target));
Trace::add_trace("Page token", __FILE__, array("token" => $Page->token));
/**************************** Secure Request  *********************************/
Trace::add_step(__FILE__, "Secure Request Handler");
$request = $Page->Func->synth($_POST, array("req", "token"));
if ($User->user_loged && $request["req"] !== "" && $request["token"] === $User->sess_save["sess"]) {
    Trace::add_trace("Secure request detected.", __FILE__, $request);
    switch ($request["req"]) {
        case "api":
            Trace::add_trace("Loading Api Request", __FILE__);
            $Page->secure = true;
            $Page->target = "api";
            break;
        default:
            die("E:01");
    }
}
/****************************** Page Loader ***********************************/
switch ($Page->target) {
    case "api":
        Trace::add_step(__FILE__, "Load secure api");
        if ($Page->secure) {
            include_once PATH_CLASSES . "Api.class.php";
            include_once PATH_PAGES . "api.php";
        } else {
开发者ID:shlomohass,项目名称:MidataControl,代码行数:31,代码来源:index.php

示例6: save_db_errors

 private function save_db_errors($error, $query)
 {
     Trace::add_trace('Run DB save error', __METHOD__);
     if (getenv("HTTP_X_FORWARDED_FOR") && getenv("HTTP_X_FORWARDED_FOR") !== "") {
         $IP = getenv("HTTP_X_FORWARDED_FOR");
         $proxy = getenv("REMOTE_ADDR");
         $host = gethostbyaddr(getenv("HTTP_X_FORWARDED_FOR"));
     } else {
         $IP = getenv("REMOTE_ADDR");
         $proxy = "No proxy detected";
         $host = gethostbyaddr(getenv("REMOTE_ADDR"));
     }
     if (!$IP || $IP === '' || $IP === null) {
         $IP = 'cant';
     }
     if (!$proxy || $proxy === '' || $proxy === null) {
         $proxy = 'cant';
     }
     if (!$host || $host === '' || $host === null) {
         $host = 'cant';
     }
     $this->insert_safe($this->filter(LOG_DB_TO_TABLE), array('page' => basename($_SERVER['PHP_SELF']), 'user_ip' => $IP, 'proxy' => $proxy, 'host' => $host, 'sql_message' => $error, 'query_used' => $query), false);
 }
开发者ID:shlomohass,项目名称:MidataControl,代码行数:23,代码来源:DB.class.php

示例7: __construct

 public function __construct()
 {
     Trace::add_trace('construct class', __METHOD__);
 }
开发者ID:shlomohass,项目名称:IID,代码行数:4,代码来源:FStable.class.php

示例8: __construct

 /** Constructor
  * 
  *  @param array $conf
  * 
  */
 public function __construct($conf)
 {
     parent::__construct($conf);
     Trace::add_trace('construct class', __METHOD__);
 }
开发者ID:shlomohass,项目名称:MidataControl,代码行数:10,代码来源:Api.class.php

示例9: rand_string

 /** Random string generator
  * 
  * @param int $length
  * @return string
  * 
  */
 public function rand_string($length = 10)
 {
     Trace::add_trace('rand string', __METHOD__);
     $ch = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
     $chLength = strlen($ch);
     $rand = '';
     for ($i = 0; $i < $length; $i++) {
         $rand .= $ch[rand(0, $chLength - 1)];
     }
     return $rand;
 }
开发者ID:shlomohass,项目名称:IID,代码行数:17,代码来源:Func.class.php


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