本文整理匯總了PHP中security::addSlashes方法的典型用法代碼示例。如果您正苦於以下問題:PHP security::addSlashes方法的具體用法?PHP security::addSlashes怎麽用?PHP security::addSlashes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類security
的用法示例。
在下文中一共展示了security::addSlashes方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$oops->ouch('APP_PHP_TOO_OLD', true);
}
// Anit GLOBALS var
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) {
$oops->ouch('APP_BAD_ATTEMPT', true);
}
// Anit long or huge request
if (isset($_SERVER['PATH_INFO'][512])) {
$oops->ouch('APP_DATABLOCK_TOO_LARGE', true);
}
// Let's Add Slashes to REQUEST variable first, for safe.
$_MYGET = $_MYPOST = array();
// Init Security Unit here
$sec = new security($oops);
// First things will do when $sec has been loaded
if (!empty($_GET) && ($_MYGET = $sec->addSlashes($_GET))) {
$_runtime['GetFilled'] = true;
}
if (!empty($_POST) && ($_MYPOST = $sec->addSlashes($_POST))) {
$_runtime['PostFilled'] = true;
}
unset($_GET, $_POST);
// Unset it so no one can use
// Init Cache module
$cac = new filecache($cfg['cache'], $oops, $sec);
// Init Database Unit
$db = new db($cfg['db'], $oops, $sec, $cac);
/** START OF SITE SETTING **/
$site = array();
if (!($site = $cac->read('SITE', 'SITECFG', 86400))) {
$temp_site = array();