本文整理匯總了PHP中Toolbox::get_magic_quotes_gpc方法的典型用法代碼示例。如果您正苦於以下問題:PHP Toolbox::get_magic_quotes_gpc方法的具體用法?PHP Toolbox::get_magic_quotes_gpc怎麽用?PHP Toolbox::get_magic_quotes_gpc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Toolbox
的用法示例。
在下文中一共展示了Toolbox::get_magic_quotes_gpc方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array_map
if (isset($_GET)) {
if (Toolbox::get_magic_quotes_gpc()) {
$_GET = array_map(array('Toolbox', 'stripslashes_deep'), $_GET);
}
$_GET = array_map(array('Toolbox', 'addslashes_deep'), $_GET);
$_GET = array_map(array('Toolbox', 'clean_cross_side_scripting_deep'), $_GET);
}
if (isset($_REQUEST)) {
if (Toolbox::get_magic_quotes_gpc()) {
$_REQUEST = array_map(array('Toolbox', 'stripslashes_deep'), $_REQUEST);
}
$_REQUEST = array_map(array('Toolbox', 'addslashes_deep'), $_REQUEST);
$_REQUEST = array_map(array('Toolbox', 'clean_cross_side_scripting_deep'), $_REQUEST);
}
if (isset($_FILES)) {
if (Toolbox::get_magic_quotes_gpc()) {
$_FILES = array_map(array('Toolbox', 'stripslashes_deep'), $_FILES);
}
$_FILES = array_map(array('Toolbox', 'addslashes_deep'), $_FILES);
$_FILES = array_map(array('Toolbox', 'clean_cross_side_scripting_deep'), $_FILES);
}
// Mark if Header is loaded or not :
$HEADER_LOADED = false;
$FOOTER_LOADED = false;
if (isset($AJAX_INCLUDE)) {
$HEADER_LOADED = true;
}
/* On startup, register all plugins configured for use. */
if (!isset($AJAX_INCLUDE) && !isset($PLUGINS_INCLUDED)) {
// PLugin already included
$PLUGINS_INCLUDED = 1;
示例2: protectData
static function protectData($data)
{
if (Toolbox::get_magic_quotes_gpc()) {
$data = Toolbox::stripslashes_deep($data);
}
$data = Toolbox::addslashes_deep($data);
$data = Toolbox::clean_cross_side_scripting_deep($data);
return $data;
}