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


PHP log::instance方法代码示例

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


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

示例1: getInstance

 public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:barkalovys,项目名称:banlist,代码行数:7,代码来源:log.class.php

示例2: dl_recharge

function dl_recharge($AppId)
{
    log::init('./log', 'dl_log');
    $uri = $_SERVER['REQUEST_URI'];
    log::instance()->debug("new con: {$uri}");
    $config = (include "config.php");
    $pf_info = $config["dl"][$AppId];
    $str = "order=" . stripslashes($_GET["order"]) . "&money=" . stripslashes($_GET["money"]) . "&mid=" . stripslashes($_GET["mid"]) . "&time=" . stripslashes($_GET["time"]) . "&result=" . stripslashes($_GET["result"]) . "&ext=" . stripslashes($_GET["ext"]) . "&key=" . $pf_info["AppKey"];
    $sign = strtolower(md5($str));
    if ($sign != stripslashes($_GET["signature"])) {
        log::instance()->error("ret: 签名无效");
        exit;
    }
    echo "success";
    $note = json_decode(stripslashes($_GET["ext"]), true);
    $ret = recharge($pf_info["PF"], $note["sid"], $note["odr"], $note["uid"], $note["item"], stripslashes($_GET["money"]), stripslashes($_GET["order"]), 0);
    log::instance()->debug("ret: " . $ret);
    if ($ret != "SUCCESS" && $ret != "TRADE_NO NOT EXIST") {
        $str = "app_id={$AppId}" . "&mid=" . stripslashes($_GET["mid"]) . "&order_no=" . stripslashes($_GET["order"]) . "&key=" . $pf_info["AppKey"];
        $sign = strtolower(md5($str));
        $url = "http://connect.d.cn/open/pay-async/refund" . "?app_id=" . urlencode($AppId) . "&mid=" . urlencode(stripslashes($_GET["mid"])) . "&order_no=" . urlencode(stripslashes($_GET["order"])) . "&sig=" . urlencode($sign);
        $response = file_get_contents($url);
        log::instance()->debug("refund: order:" . stripslashes($_GET["order"]) . " ret:{$response}");
    }
}
开发者ID:ChaosCoo,项目名称:gserver,代码行数:25,代码来源:dl.php

示例3: i

 public static function i($class)
 {
     if (!isset(self::$instance)) {
         $classname = "log_" . $class;
         self::$instance = new $classname();
     }
     return self::$instance;
 }
开发者ID:Git-Host,项目名称:sms,代码行数:8,代码来源:log.inc.php

示例4: log

 /**
  * Short description of method instance
  *
  * @access public
  * @author Jean-Francois Levesque, <jf.levesque@step.polymtl.ca>
  * @return void
  */
 public static function &instance()
 {
     if (!log::$instance) {
         log::$instance = new log();
         log::$instance->init();
     }
     return log::$instance;
 }
开发者ID:Gwagz,项目名称:stationnement_aep,代码行数:15,代码来源:class.log.php

示例5: mz_recharge

function mz_recharge($AppId)
{
    log::init('./log', 'mz_log');
    $uri = $_SERVER['REQUEST_URI'];
    $body = file_get_contents('php://input');
    log::instance()->debug("new con: {$uri} {$body}");
    $config = (include "config.php");
    $pf_info = $config["mz"][$AppId];
    $str = stripslashes($_POST["username"]) . "|" . stripslashes($_POST["change_id"]) . "|" . stripslashes($_POST["money"]) . "|" . $pf_info["AppKey"];
    $sign = stripslashes($_POST["hash"]);
    if (strtolower(md5($str)) != $sign) {
        log::instance()->error("ret: 签名无效");
        echo "0";
        exit;
    }
    $note = json_decode(stripslashes($_POST["object"]), true);
    $ret = recharge($pf_info["PF"], $note["sid"], $note["odr"], $note["uid"], $note["item"], stripslashes($_POST["money"]), stripslashes($_POST["change_id"]), 0);
    log::instance()->debug("ret: " . $ret);
    if ($ret == "SUCCESS" || $ret == "TRADE_NO NOT EXIST") {
        echo "1";
    } else {
        echo "0";
    }
}
开发者ID:ChaosCoo,项目名称:gserver,代码行数:24,代码来源:mz_recharge.php

示例6: header

include_once "recharge.php";
$config = (include "config.php");
header("Content-type: text/html; charset=utf-8");
log::init('./log', 'dk_log');
$uri = $_SERVER['REQUEST_URI'];
log::instance()->debug("new con: {$uri}");
$AppId = "3491827";
$pf_info = $config["dk"][$AppId];
$str = stripslashes($_GET["amount"]) . stripslashes($_GET["cardtype"]) . stripslashes($_GET["orderid"]) . stripslashes($_GET["result"]) . stripslashes($_GET["timetamp"]) . $pf_info["AppKey"] . urlencode(stripslashes($_GET["aid"]));
$sign = strtolower(md5($str));
if ($sign != stripslashes($_GET["client_secret"])) {
    log::instance()->error("ret: 签名无效");
    echo "ERROR_SIGN";
    exit;
}
if (stripslashes($_GET["result"]) == 2) {
    log::instance()->error("ret: 支付失败");
    echo "SUCCESS";
    exit;
}
$note = json_decode(stripslashes($_GET["aid"]), true);
$ret = recharge($pf_info["PF"], $note["sid"], stripslashes($_GET["orderid"]), $note["uid"], $note["item"], stripslashes($_GET["amount"]), stripslashes($_GET["orderid"]), 0);
log::instance()->debug("ret: " . $ret);
if ($ret == "TRADE_NO NOT EXIST") {
    $ret = "ERROR_REPEAT";
} else {
    if ($ret != "SUCCESS") {
        $ret = "ERROR_FAIL";
    }
}
echo $ret;
开发者ID:WeipengChan,项目名称:gserver,代码行数:31,代码来源:dk.php

示例7: error_reporting

<?php

error_reporting(E_ALL);
require_once "class.authentification.php";
require_once 'class.config.php';
require_once "class.demandeListe.php";
require_once "class.demande.php";
require_once "class.log.php";
require_once "class.validation.php";
require_once "class.userData.php";
require_once "class.car.php";
define('CANCEL_DEMAND_POST', 'cancelDemand');
define('REACTIVATE_DEMAND_POST', 'reactivateDemand');
$objAuth = authentification::instance();
$objLog = log::instance();
$objvalid = validation::instance();
$objDemandeListe = new demandeListe();
$objDemande = null;
$fileFieldIndex = 0;
if ($objAuth->estIdentifie()) {
    $matricule = $_SESSION['usager'];
    $submissionTarget = util::getParam($_POST, 'submissionTarget');
    $submissionType = util::getParam($_POST, 'submissionType');
    $demande = new demande($matricule);
    if ($submissionTarget == 'demande') {
        if ($submissionType == CANCEL_DEMAND_POST) {
            $demande->cancelDemand();
            header("Location: demande.php");
        } else {
            if ($submissionType == REACTIVATE_DEMAND_POST) {
                $demande->reactivateDemand();
开发者ID:Gwagz,项目名称:stationnement_aep,代码行数:31,代码来源:demande.php

示例8: array

$pay_cookie = array('session_id' => 'openid', 'session_type' => 'kp_actoken', 'org_loc' => '/mpay/pay_m');
$result = $openApi->api($pay_cookie['org_loc'], $pay_params, $pay_cookie, 'GET', 'https');
$result['msg'] = urlencode($result['msg']);
$response = array('type' => 1, 'ret' => $result['ret']);
if ($result['ret'] === 0) {
    log::instance()->debug("ret: 扣款成功 " . urldecode(json_encode($result)));
    $response['balance'] = $result['balance'];
} else {
    log::instance()->error("ret: 扣款失败 " . urldecode(json_encode($result)));
    $response['err_code'] = $result['err_code'];
    echo json_encode($response);
    exit;
}
// 发钻石
$note = json_decode(stripslashes($params['appmeta']), true);
$ret = recharge($pf_info["PF"], stripslashes($params["zoneid"]), $note["odr"], $note["uid"], $note["item"], $params["save_num"] / 10, $result["billno"], 0);
log::instance()->debug("ret: " . $ret);
if ($ret != "SUCCESS" && $ret != "TRADE_NO NOT EXIST") {
    // 退款
    $pay_params = array('openid' => $params['openid'], 'openkey' => $params['openkey'], 'pay_token' => $params['pay_token'], 'ts' => time(), 'pf' => $params['pf'], 'zoneid' => $params['zoneid'], 'amt' => $params['save_num'], 'pfkey' => $params['pfkey'], 'billno' => $result['billno']);
    $pay_cookie = array('session_id' => 'openid', 'session_type' => 'kp_actoken', 'org_loc' => '/mpay/cancel_pay_m');
    $result = $openApi->api($pay_cookie['org_loc'], $pay_params, $pay_cookie, 'GET', 'https');
    $result['msg'] = urlencode($result['msg']);
    $response = array('type' => 2, 'ret' => $result['ret']);
    if ($result['ret'] === 0) {
        log::instance()->debug("ret: 退款成功 " . urldecode(json_encode($result)));
    } else {
        log::instance()->error("ret: 退款失败 " . urldecode(json_encode($result)));
    }
}
echo json_encode($response);
开发者ID:ChaosCoo,项目名称:gserver,代码行数:31,代码来源:qq.php

示例9: init

 /**
  * Short description of method instance
  *
  * @access private
  * @return void
  */
 private function init()
 {
     $this->objLog = log::instance();
 }
开发者ID:Gwagz,项目名称:stationnement_aep,代码行数:10,代码来源:class.database.php

示例10: send_password_email

 public function send_password_email($password)
 {
     try {
         $mail = mail::create('userautocreated')->to($this->email)->tokenise(array('username' => $this->username, 'password' => $password))->send();
         return true;
     } catch (exception $e) {
         log::instance('Couldnt send user autogenerated password', $e);
     }
     return false;
 }
开发者ID:artbypravesh,项目名称:morningpages,代码行数:10,代码来源:User.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->objDatabase = database::instance();
     $this->objLog = log::instance();
 }
开发者ID:Gwagz,项目名称:stationnement_aep,代码行数:6,代码来源:class.demandeListe.php

示例12: init

 public function init()
 {
     $this->objLog = log::instance();
     $this->database = database::instance();
     $this->car1 = new car(1);
     $this->car2 = new car(2);
     $this->userData = new userData($this->matricule);
     $this->userData->getUserData($_SESSION['usager']);
 }
开发者ID:Gwagz,项目名称:stationnement_aep,代码行数:9,代码来源:class.demande.php

示例13: init

 /**
  * Short description of method instance
  *
  * @access private
  * @return void
  */
 private function init()
 {
     $this->objDatabase = database::instance();
     $this->objLog = log::instance();
     session_save_path(config::PhpSessionPath);
     session_set_cookie_params(0);
     session_start();
     $this->estIdentifie();
 }
开发者ID:Gwagz,项目名称:stationnement_aep,代码行数:15,代码来源:class.authentification.php


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