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


PHP base::load方法代码示例

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


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

示例1: substr

error_reporting(0);
define('IN_TIPASK', TRUE);
define('TIPASK_ROOT', substr(dirname(__FILE__), 0, -4));
defined('MAGIC_QUOTES_GPC') || define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
date_default_timezone_set('Etc/GMT-8');
require_once TIPASK_ROOT . '/config.php';
require_once TIPASK_ROOT . '/lib/db.class.php';
require_once TIPASK_ROOT . '/model/base.class.php';
require_once TIPASK_ROOT . '/lib/global.func.php';
require_once TIPASK_ROOT . '/lib/CacheMemcache.class.php';
require_once TIPASK_ROOT . '/lib/config.class.php';
require_once TIPASK_ROOT . '/lib/pdo/Mysql/hash.class.php';
$base = new base();
// 获取complian站点的新投诉问题
$base->load('complain');
$base->load('question');
$base->load('qtype');
if ($_GET['act'] == 'ts_new') {
    md5($_GET['data'] . 'ts_new') != strtolower($_GET['key']) && exit;
    $data = json_decode($_GET['data'], true);
    !isset($data['id']) && exit;
    !isset($data['sid']) && exit;
    $data = taddslashes_new($data);
    $sync = $_ENV['complain']->getSyncByComplain($data['id']);
    if ($sync['cpid'] > 0) {
        $return_arr = array('return' => 1, 'comment' => $sync['scid'] . "," . $sync['cpid']);
    } else {
        $contactArr = explode(';', $data['contact']);
        if (isset($contactArr['1'])) {
            $contact = array('OnceAnsweredQQ' => $contact['3'], 'contact' => array('moblie' => $contactArr['2'], 'weixin' => $contactArr[1], 'qq' => $contactArr['0']));
开发者ID:eappl,项目名称:prototype,代码行数:30,代码来源:get_new_complian.php

示例2: exit

//get parameter
if (!isset($_GET['code']) || empty($_GET['code'])) {
    exit("ERR:NODATA");
}
parse_str(authcode($_GET['code'], 'DECODE', UC_KEY), $get);
if (empty($get)) {
    exit("ERR\tREQUEST");
}
if (empty($get['email']) || !preg_match('/.+@.+\\..+/', $get['email'])) {
    exit("ERR\tNOPARAM");
}
$email = $get['email'];
//check user
include_once UC_ROOT . './model/base.php';
$modelbase = new base();
$modelbase->load('user');
if (!$_ENV['user'] || !method_exists($_ENV['user'], 'get_user_by_email')) {
    exit("ERR\tNOLIB");
}
$user = $_ENV['user']->get_user_by_email($email);
if (!$user || !$user['uid']) {
    exit("ERR\tNOUSER");
}
//check member
$member = C::t('common_member')->fetch($user['uid'], 0, 1);
if (!is_array($member) || !$member['uid'] || !$member['username']) {
    exit("ERR\tNOMEMBER");
}
if (substr($member['username'], -3) == '@FB') {
    exit("ERR\tUSERNAME:Facebook");
}
开发者ID:hacktea8,项目名称:d_z_s_t_u_d_e_n_t,代码行数:31,代码来源:bind.inc.php

示例3: exit

require_once TIPASK_ROOT . '/lib/db.class.php';
require_once TIPASK_ROOT . '/lib/config.class.php';
require_once TIPASK_ROOT . '/lib/CacheMemcache.class.php';
require TIPASK_ROOT . '/model/base.class.php';
$jsoncallback = $_GET['jsoncallback'];
!isset($_GET['userInfo']) && exit($jsoncallback . "([{msg:\"usrInfo 不能为空\",return:0}]");
!isset($_GET['scid']) && exit($jsoncallback . "([{msg:\"scid 不能为空\",return:0}]");
!isset($_GET['time']) && exit($jsoncallback . "([{msg:\"time 不能为空\",return:0}]");
!isset($_GET['userInfo']) && exit($jsoncallback . "([{msg:\"userInfo 不能为空\",return:0}]");
$scid = intval($_GET['scid']);
// 绑定客服id
$time = intval($_GET['time']);
// 操作时间10位整形
if (abs($time - time()) >= 600) {
    $time = time();
}
$author = trim(urldecode($_GET['userInfo']));
// 登陆用户名
if ($scid <= 0) {
    exit($jsoncallback . "([{msg:\"scid 数值不对\",return:0}])");
}
$base = new base();
$base->load('bind_log');
$bindLogArr = array('author' => $author, 'scid' => $scid, 'bind_time' => $time);
$result = $_ENV['bind_log']->bindUnbindOperator($bindLogArr);
// 绑定解绑操作
if ($result) {
    //exit($jsoncallback."([{msg:\"success\",return:1}])");
} else {
    //exit($jsoncallback."([{msg:\"failure rollback\",return:0}])");
}
开发者ID:eappl,项目名称:prototype,代码行数:31,代码来源:bind_log.php

示例4: substr

define('IN_TIPASK', TRUE);
define('TIPASK_ROOT', substr(dirname(__FILE__), 0, -4));
date_default_timezone_set('Etc/GMT-8');
defined('MAGIC_QUOTES_GPC') || define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
require_once TIPASK_ROOT . '/config.php';
require_once TIPASK_ROOT . '/lib/pdo/Mysql/pdo.class.php';
require_once TIPASK_ROOT . '/lib/pdo/Mysql/hash.class.php';
require_once TIPASK_ROOT . '/lib/global.func.php';
require_once TIPASK_ROOT . '/lib/db.class.php';
require_once TIPASK_ROOT . '/lib/config.class.php';
require_once TIPASK_ROOT . '/lib/CacheMemcache.class.php';
require TIPASK_ROOT . '/model/base.class.php';
$post = $_POST;
//$post = ($_GET);
$base = new base();
$base->load('question');
$base->load('complain');
$base->load('qtype');
$base->load('operator');
$base->load('category');
$time = $_SERVER['REQUEST_TIME'];
!isset($post['act']) && exit(json_encode(array('msg' => 'act 为空')));
$LogName = TIPASK_ROOT . "/data/logs/{$post['act']}" . date("Y-m-d") . ".txt";
file_put_contents($LogName, date("Y-m-d H:i:s") . "\r\n" . var_export($post, true) . "\r\n", FILE_APPEND);
//投诉回答处理
if ($post['act'] == 'ts_cl') {
    !isset($post['qid']) && exit(json_encode(array('msg' => 'qid参数为空')));
    !isset($post['content']) && exit(json_encode(array('msg' => 'content参数为空')));
    !isset($post['csn']) && exit(json_encode(array('msg' => 'csn参数为空')));
    $result = $_ENV['complain']->updateComplainAnswer($post);
    if ($result == 1) {
开发者ID:eappl,项目名称:prototype,代码行数:31,代码来源:ts.php

示例5: array

require TIPASK_ROOT . '/lib/config.class.php';
require TIPASK_ROOT . '/lib/db.class.php';
require TIPASK_ROOT . '/lib/pdo/Mysql/pdo.class.php';
require TIPASK_ROOT . '/lib/pdo/Mysql/hash.class.php';
require_once TIPASK_ROOT . '/lib/global.func.php';
require_once TIPASK_ROOT . '/lib/CacheMemcache.class.php';
//require_once TIPASK_ROOT.'/lib/CacheRedis.class.php';
$table = array('table_question' => "ask_question", 'table_complain' => "ask_complain");
$returnArray = array('suggest' => array(), 'ask' => array(), 'complain' => array());
$type = trim($_GET['type']) == "new" ? "new" : "old";
$count = intval($_GET['count']) > 0 ? intval($_GET['count']) : 10;
$qtype = intval($_GET['qtype']) > 0 ? intval($_GET['qtype']) : 0;
$memcache = new CacheMemcache();
$base = new base();
$pdo = $base->init_pdo($table['table_question']);
$base->load('question');
$base->load('qtype');
$base->load('answer');
$base->load('category');
$base->load('complain');
$q = $memcache->get('newqtype_list');
if (false !== $q) {
    $qtypeList = json_decode($q, true);
} else {
    $qtypeList = $_ENV['qtype']->GetAllQType(1, "", 0);
    $memcache->set('qtype_list', json_encode($qtypeList), 30 * 60);
    //缓存60秒
}
if (!isset($qtypeList[$qtype])) {
    $qtype = 0;
}
开发者ID:eappl,项目名称:prototype,代码行数:31,代码来源:new_suggest.php


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