本文整理汇总了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;
}