本文整理汇总了PHP中stripSlashesDeep函数的典型用法代码示例。如果您正苦于以下问题:PHP stripSlashesDeep函数的具体用法?PHP stripSlashesDeep怎么用?PHP stripSlashesDeep使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了stripSlashesDeep函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parseParams
/**
* Collect all data and put it in one array
* @return array $params
*/
function parseParams(){
$params = array();
if(ini_get('magic_quotes_gpc') == 1){
//$_POST
if(!empty($_POST)) $params = array_merge($params, stripSlashesDeep($_POST));
//$_GET
if(!empty($_GET)) $params = array_merge($params, stripSlashesDeep($_GET));
//$_FILES
if(!empty($_FILES)) $params = array_merge($params, stripSlashesDeep($_FILES));
}else{
//$_POST
if(!empty($_POST)) $params = array_merge($params, $_POST);
//$_GET
if(!empty($_GET)) $params = array_merge($params, $_GET);
//$_FILES
if(!empty($_FILES)) $params = array_merge($params, $_FILES);
}
return $params;
}
示例2: removeMagicQuotes
function removeMagicQuotes() {
if(get_magic_quotes_gpc()) {
$_GET = stripSlashesDeep($_GET);
$_POST = stripSlashesDeep($_POST);
$_COOKIE = stripSlashesDeep($_COOKIE);
}
}
示例3: session_start
}
}
}
if (DO_NOT_START_SESSION != 1) {
session_start();
}
function stripSlashesDeep($value)
{
$value = is_array($value) ? array_map('stripSlashesDeep', $value) : stripslashes($value);
return $value;
}
if (get_magic_quotes_gpc() || defined('FORCE_MAGIC_QUOTES') && FORCE_MAGIC_QUOTES == 1) {
$_GET = stripSlashesDeep($_GET);
$_POST = stripSlashesDeep($_POST);
$_REQUEST = stripSlashesDeep($_REQUEST);
$_COOKIE = stripSlashesDeep($_COOKIE);
}
if (CROSS_DOMAIN == 1) {
if (!empty($_REQUEST)) {
foreach ($_REQUEST as $param => $value) {
if (substr($param, 0, 7) == 'cookie_') {
if ($value != 'null') {
$_COOKIE[substr($param, 7)] = $value;
}
}
}
}
}
if (get_magic_quotes_runtime()) {
set_magic_quotes_runtime(false);
}
示例4: removeMagicQuotes
/**
* Check for Magic Quotes and remove them
*/
public static function removeMagicQuotes()
{
function stripSlashesDeep($value)
{
return is_array($value) ? array_map("stripSlashesDeep", $value) : stripslashes($value);
}
if (get_magic_quotes_gpc()) {
if (isset($_GET)) {
$_GET = stripSlashesDeep($_GET);
}
if (isset($_POST)) {
$_POST = stripSlashesDeep($_POST);
}
if (isset($_COOKIE)) {
$_COOKIE = stripSlashesDeep($_COOKIE);
}
if (isset($_SESSION)) {
$_SESSION = stripSlashesDeep($_SESSION);
}
}
}
示例5: removeMagicQuotes
function removeMagicQuotes()
{
$_GET = stripSlashesDeep($_GET);
$_POST = stripSlashesDeep($_POST);
$_COOKIE = stripSlashesDeep($_COOKIE);
}
示例6: substr_replace
<?php
//Current URI
$url = $_SERVER['REQUEST_URI'];
$url = substr_replace($url, '', 0, 1);
$params = array();
$breadcrumb = '';
//Add start page
//$_POST
if(!empty($_POST)) $params = array_merge($params, (ini_get('magic_quotes_gpc') == 1 ? stripSlashesDeep($_POST) : $_POST));
//$_GET
if(!empty($_GET)) $params = array_merge($params, (ini_get('magic_quotes_gpc') == 1 ? stripSlashesDeep($_GET) : $_GET));
//$_FILES
if(!empty($_FILES)) $params = array_merge($params, (ini_get('magic_quotes_gpc') == 1 ? stripSlashesDeep($_FILES) : $_FILES));
//Remove ?elements
$url = str_replace('?'.$_SERVER['QUERY_STRING'], '', $url);
$foundRoute = false;
$page = null;
include_once 'routing.php';
foreach($routes as $route)
{
if(@preg_match($route['alias'], $url, $matches))
{
$params = array_merge($params, $matches);
$layout = $route['layout'];
$folder = $route['folder'];
$page = $route['file'];