本文整理汇总了PHP中Sanitize::cleanGlobals方法的典型用法代码示例。如果您正苦于以下问题:PHP Sanitize::cleanGlobals方法的具体用法?PHP Sanitize::cleanGlobals怎么用?PHP Sanitize::cleanGlobals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sanitize
的用法示例。
在下文中一共展示了Sanitize::cleanGlobals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
protected final function __construct()
{
// Turn error reporting off as it is displayed in debugger mode only!
ini_set('display_errors', false);
// Show ALL errors & notices
error_reporting(E_ALL ^ E_NOTICE);
ini_set('ignore_repeated_errors', true);
ini_set('ignore_repeated_source', true);
// Enable HTML Error messages
ini_set('html_errors', true);
ini_set('docref_root', 'http://docs.php.net/manual/en/');
ini_set('docref_ext', '.php');
// Define the Error & Exception handlers
set_error_handler(array(&$this, 'errorLogger'), ini_get('error_reporting'));
set_exception_handler(array(&$this, 'exceptionHandler'));
// Enable debugger
if (isset($GLOBALS['config']) && is_object($GLOBALS['config'])) {
$this->_enabled = (bool) $GLOBALS['config']->get('config', 'debug');
$ip_string = $GLOBALS['config']->get('config', 'debug_ip_addresses');
if (!empty($ip_string)) {
if (strstr($ip_string, ',')) {
$ip_addresses = explode(',', $ip_string);
if (!in_array(get_ip_address(), $ip_addresses)) {
$this->_enabled = false;
}
} else {
if ($ip_string !== get_ip_address()) {
$this->_enabled = false;
}
}
}
}
//If its time to clear the cache
if (isset($_GET['debug-cache-clear'])) {
$GLOBALS['cache']->clear();
$GLOBALS['cache']->tidy();
httpredir(currentPage(array('debug-cache-clear')));
}
//Check for xdebug
if (extension_loaded('xdebug') && function_exists('xdebug_is_enabled')) {
$this->_xdebug = xdebug_is_enabled();
}
$this->_debug_timer = $this->_getTime();
// Check register_globals
if (ini_get('register_globals')) {
trigger_error('register_globals are enabled. It is highly recommended that you disable this in your PHP configuration, as it is a large security hole, and may wreak havoc.', E_USER_WARNING);
}
Sanitize::cleanGlobals();
}