本文整理匯總了PHP中IPSCookie::sensitive_cookies方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSCookie::sensitive_cookies方法的具體用法?PHP IPSCookie::sensitive_cookies怎麽用?PHP IPSCookie::sensitive_cookies使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSCookie
的用法示例。
在下文中一共展示了IPSCookie::sensitive_cookies方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
* Set to 0 to not match with IP address
*/
define('CVG_IP_MATCH', 1);
require_once '../../initdata.php';
//===========================================================================
// MAIN PROGRAM
//===========================================================================
define('IPS_CLASS_PATH', IPS_ROOT_PATH . 'sources/classes/');
require_once IPS_ROOT_PATH . 'sources/base/ipsRegistry.php';
require_once IPS_ROOT_PATH . 'sources/base/ipsController.php';
//-----------------------------------------
// Set up cookie stuff
//-----------------------------------------
$registry = ipsRegistry::instance();
$registry->init();
IPSCookie::$sensitive_cookies = array('session_id', 'ipb_admin_session_id', 'member_id', 'pass_hash');
//--------------------------------
// Set up our vars
//--------------------------------
$registry->DB()->obj['use_shutdown'] = 0;
//--------------------------------
// Set debug mode
//--------------------------------
$registry->DB()->setDebugMode(ipsRegistry::$settings['sql_debug'] == 1 ? intval($_GET['debug']) : 0);
//===========================================================================
// Create the XML-RPC Server
//===========================================================================
require_once IPS_KERNEL_PATH . 'classApiServer.php';
$server = new classApiServer();
$api = $server->decodeRequest();
//===========================================================================
示例2: init
/**
* Initiate the registry
*
* @return mixed false or void
*/
public static function init()
{
$INFO = array();
$_ipsPowerSettings = array();
if (self::$initiated === TRUE) {
return FALSE;
}
self::$initiated = TRUE;
/* Load static classes */
require IPS_ROOT_PATH . "sources/base/core.php";
/*noLibHook*/
require IPS_ROOT_PATH . "sources/base/ipsMember.php";
/*noLibHook*/
/* Debugging notices? */
if (defined('IPS_ERROR_CAPTURE') and IPS_ERROR_CAPTURE !== FALSE) {
@error_reporting(E_ALL | E_NOTICE);
@set_error_handler("IPSDebug::errorHandler");
}
/* Load core variables */
self::_loadCoreVariables();
/* Load config file */
if (is_file(DOC_IPS_ROOT_PATH . 'conf_global.php')) {
require DOC_IPS_ROOT_PATH . 'conf_global.php';
/*noLibHook*/
if (is_array($INFO)) {
foreach ($INFO as $key => $val) {
ipsRegistry::$settings[$key] = str_replace('\', '\\', $val);
}
}
}
/* Load secret sauce */
if (is_array($_ipsPowerSettings)) {
ipsRegistry::$settings = array_merge($_ipsPowerSettings, ipsRegistry::$settings);
}
/* Make sure we're installed */
if (empty($INFO['sql_database'])) {
/* Quick PHP version check */
if (!version_compare(MIN_PHP_VERS, PHP_VERSION, '<=')) {
print "You must be using PHP " . MIN_PHP_VERS . " or better. You are currently using: " . PHP_VERSION;
exit;
}
$host = $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : @getenv('HTTP_HOST');
$self = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : @getenv('PHP_SELF');
if (IPS_AREA == 'admin') {
@header("Location: http://" . $host . rtrim(dirname($self), '/\\') . "/install/index.php");
} else {
if (!defined('CP_DIRECTORY')) {
define('CP_DIRECTORY', 'admin');
}
@header("Location: http://" . $host . rtrim(dirname($self), '/\\') . "/" . CP_DIRECTORY . "/install/index.php");
}
}
/* Switch off dev mode you idjit */
if (!defined('IN_DEV')) {
define('IN_DEV', 0);
}
/* Shell defined? */
if (!defined('IPS_IS_SHELL')) {
define('IPS_IS_SHELL', FALSE);
}
/* If this wasn't defined in the gateway file... */
if (!defined('ALLOW_FURLS')) {
define('ALLOW_FURLS', ipsRegistry::$settings['use_friendly_urls'] ? TRUE : FALSE);
}
if (!defined('IPS_IS_MOBILE_APP')) {
define('IPS_IS_MOBILE_APP', false);
}
/**
* File and folder permissions
*/
if (!defined('IPS_FILE_PERMISSION')) {
define('IPS_FILE_PERMISSION', 0777);
}
if (!defined('IPS_FOLDER_PERMISSION')) {
define('IPS_FOLDER_PERMISSION', 0777);
}
/* Set it again incase a gateway turned it off */
ipsRegistry::$settings['use_friendly_urls'] = ALLOW_FURLS;
/* Start timer */
IPSDebug::startTimer();
/* Cookies... */
IPSCookie::$sensitive_cookies = array('session_id', 'admin_session_id', 'member_id', 'pass_hash');
/* INIT DB */
self::$handles['db'] = ips_DBRegistry::instance();
/* Set DB */
self::$handles['db']->setDB(ipsRegistry::$settings['sql_driver']);
/* Input set up... */
if (is_array($_POST) and count($_POST)) {
foreach ($_POST as $key => $value) {
# Skip post arrays
if (!is_array($value)) {
$_POST[$key] = IPSText::stripslashes($value);
}
}
}
//.........這裏部分代碼省略.........