當前位置: 首頁>>代碼示例>>PHP>>正文


PHP stripSlashesDeep函數代碼示例

本文整理匯總了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;
}
開發者ID:ndusan,項目名稱:belvi,代碼行數:33,代碼來源:share.php

示例2: removeMagicQuotes

function removeMagicQuotes() {
	if(get_magic_quotes_gpc()) {
		$_GET = stripSlashesDeep($_GET);
		$_POST = stripSlashesDeep($_POST);
		$_COOKIE = stripSlashesDeep($_COOKIE);
	}
}
開發者ID:nathanjsweet,項目名稱:Reflexion,代碼行數:7,代碼來源:urlparser.php

示例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);
}
開發者ID:jorgemunoz8807,項目名稱:havanabook,代碼行數:31,代碼來源:cometchat_init.php

示例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);
         }
     }
 }
開發者ID:mvnp,項目名稱:Simple-MVC-Framework,代碼行數:24,代碼來源:Helper.class.php

示例5: removeMagicQuotes

function removeMagicQuotes()
{
    $_GET = stripSlashesDeep($_GET);
    $_POST = stripSlashesDeep($_POST);
    $_COOKIE = stripSlashesDeep($_COOKIE);
}
開發者ID:WHTGo,項目名稱:EXP-Training,代碼行數:6,代碼來源:shared.php

示例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'];
開發者ID:ndusan,項目名稱:playground,代碼行數:31,代碼來源:bootstrap.php


注:本文中的stripSlashesDeep函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。