本文整理匯總了PHP中bpBase::loadSysFunc方法的典型用法代碼示例。如果您正苦於以下問題:PHP bpBase::loadSysFunc方法的具體用法?PHP bpBase::loadSysFunc怎麽用?PHP bpBase::loadSysFunc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類bpBase
的用法示例。
在下文中一共展示了bpBase::loadSysFunc方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: defined
<?php
defined('IN_BACKGROUND') or exit('No permission');
$session_storage = getSessionStorageType();
bpBase::loadSysClass($session_storage);
bpBase::loadSysFunc('back');
class manage
{
public $userid;
public $username;
public $role_db;
public $user_role_db;
public static $isAdministrator;
public $token;
public $site;
public $siteid;
public function __construct()
{
bpBase::loadAppFunc('global', 'manage');
//access
//$_SESSION['token']='tokenvalue';
if (!isset($_SESSION['token']) || !strlen($_SESSION['token'])) {
header('Location:/index.php?g=User&m=Index&a=index');
}
$this->token = $_SESSION['token'];
//
$site_db = M('site');
$this->site = $site_db->getSiteByToken($this->token);
$this->siteid = intval($this->site['id']);
}
public static final function showManageTpl($file, $m = '')
示例2: getSessionStorageType
<?php
$session_storage = getSessionStorageType();
bpBase::loadSysClass($session_storage);
bpBase::loadSysFunc('front');
class front
{
public $uid;
public $username;
public $email;
public $realname;
public $mp;
public $qq;
public $credits;
public $isAdmin;
public static $user;
//
public static $smarty;
public function __construct()
{
//smarty
if (front::$smarty == '') {
//smarty
ini_set('include_path', ABS_PATH . 'library' . DIRECTORY_SEPARATOR . 'smarty' . PATH_SEPARATOR . ini_get('include_path'));
require_once 'Smarty.class.php';
//
$smartyInstance = new smarty();
if (!isset($_GET['preview']) || !intval($_GET['preview'])) {
$smartyInstance->template_dir = ABS_PATH . 'smarty' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;
} else {
$smartyInstance->template_dir = ABS_PATH . 'templates' . DIRECTORY_SEPARATOR;
示例3: define
<?php
define('SYS_TIME', time());
define('BP_PATH', ABS_PATH . MANAGE_DIR . DIRECTORY_SEPARATOR);
//係統開始時間
define('SYS_START_TIME', microtime());
//緩存文件夾地址
if (!defined('CACHE_PATH')) {
define('CACHE_PATH', ABS_PATH . 'cache' . DIRECTORY_SEPARATOR);
}
//加載公用函數庫
bpBase::loadSysFunc('global');
bpBase::loadSysFunc('extention');
//係統配置
$systemConfig = loadConfig('system');
define('DEBUG', $systemConfig['debug']);
//
if (DEBUG) {
ini_set('display_errors', '1');
error_reporting(E_ALL ^ E_NOTICE);
} else {
ini_set('display_errors', '0');
error_reporting(E_ALL & ~E_WARNING & ~E_NOTICE & ~E_STRICT);
}
//is post
if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {
$isPost = 1;
} else {
$isPost = 0;
}
define('IS_POST', $isPost);