本文整理汇总了PHP中Globals::setGlobals方法的典型用法代码示例。如果您正苦于以下问题:PHP Globals::setGlobals方法的具体用法?PHP Globals::setGlobals怎么用?PHP Globals::setGlobals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Globals
的用法示例。
在下文中一共展示了Globals::setGlobals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
* modified: Ernesto J Rodriguez (Certun)
*
* @namespace Ext.mitos.data.REMOTING_API
*/
if (!defined('_MitosEXEC')) {
die('No direct access allowed.');
}
/**
* Reset session flop count
*/
$_SESSION['site']['flops'] = 0;
/*
* Include Globals and run setGlobals static method to set the global settings
*/
include_once $_SESSION['site']['root'] . '/classes/Globals.php';
Globals::setGlobals();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><?php
echo $_SESSION['global_settings']['mitosehr_name'];
?>
</title>
<!--test stuff-->
<link rel="stylesheet" type="text/css" href="ui_app/dashboard.css" >
<!--end test stuff-->
<link rel="stylesheet" type="text/css" href="themes/resources/css/<?php
echo $_SESSION['global_settings']['css_header'];
?>
">
示例2: dirname
require_once dirname(__FILE__) . '/classes/MatchaHelper.php';
include_once dirname(__FILE__) . '/dataProvider/i18nRouter.php';
include_once dirname(__FILE__) . '/dataProvider/Globals.php';
header('Content-Type: text/javascript');
// check if is emergency access....
if (isset($_SESSION['user']) && isset($_SESSION['user']['emergencyAccess']) && $_SESSION['user']['emergencyAccess']) {
$isEmerAccess = 1;
} else {
$isEmerAccess = 0;
}
print 'isEmerAccess = ' . $isEmerAccess . ';';
// Output the translation selected by the user.
$i18n = i18nRouter::getTranslation();
print 'lang = ' . json_encode($i18n) . ';';
// Output all the globals settings on the database.
$global = Globals::setGlobals();
$global['root'] = ROOT;
$global['url'] = URL;
$global['host'] = HOST;
$global['site'] = site_dir;
print 'globals = ' . json_encode($global) . ';';
if (!isset($_SESSION['site']['error']) && (isset($_SESSION['user']) && $_SESSION['user']['auth'] == true)) {
include_once dirname(__FILE__) . '/dataProvider/ACL.php';
include_once dirname(__FILE__) . '/dataProvider/Facilities.php';
include_once dirname(__FILE__) . '/dataProvider/User.php';
$ACL = new ACL();
$perms = array();
/*
* Look for user permissions and pass it to a PHP variable.
* This variable will be used in JavaScript code
* look at it as a PHP to JavaScript variable conversion.