本文整理汇总了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);