当前位置: 首页>>代码示例>>PHP>>正文


PHP array_stripslashes函数代码示例

本文整理汇总了PHP中array_stripslashes函数的典型用法代码示例。如果您正苦于以下问题:PHP array_stripslashes函数的具体用法?PHP array_stripslashes怎么用?PHP array_stripslashes使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了array_stripslashes函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array_stripslashes

/**
 * Strips all slashes from the specified array in place (pass by ref).
 * @param Array The array to strip slashes from, typically one of
 *                     $_GET, $_POST, or $_COOKIE.
 */
function array_stripslashes(&$array) {
	if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
		debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);

	if (is_array($array))
		while (list($key) = each($array))
			if (is_array($array[$key]) && $key != $array)
				array_stripslashes($array[$key]);
			else
				$array[$key] = stripslashes($array[$key]);
}
开发者ID:rhertzog,项目名称:lcs,代码行数:16,代码来源:functions.php

示例2: array_stripslashes

function array_stripslashes($string)
{
    if (is_array($string)) {
        foreach ($string as $key => $val) {
            $string[$key] = array_stripslashes($val);
        }
    } else {
        $string = stripslashes($string);
    }
    return $string;
}
开发者ID:BGCX067,项目名称:eyesphp-svn-to-git,代码行数:11,代码来源:PHPFW.php

示例3: array_stripslashes

function array_stripslashes(&$array)
{
    if (is_array($array)) {
        while (list($key) = each($array)) {
            if (is_array($array[$key])) {
                array_stripslashes($array[$key]);
            } else {
                $array[$key] = stripslashes($array[$key]);
            }
        }
    }
}
开发者ID:sillysachin,项目名称:teamtogether,代码行数:12,代码来源:jsonexport.php

示例4: array_stripslashes

function array_stripslashes(&$var)
{
    if (is_string($var)) {
        $var = stripslashes($var);
    } else {
        if (is_array($var)) {
            foreach ($var as $key => $value) {
                array_stripslashes($var[$key]);
            }
        }
    }
}
开发者ID:hahne,项目名称:svf,代码行数:12,代码来源:functions.php

示例5: while

    while (list($var, ) = @each($input)) {
        if (!in_array($var, $not_unset)) {
            unset(${$var});
            // Testen
            if (isset($GLOBALS[$var])) {
                unset($GLOBALS[$var]);
            }
        }
    }
    unset($input);
}
// End
if (get_magic_quotes_gpc() == 1) {
    while (list($key, $value) = each($_GET)) {
        $_GET[$key] = array_stripslashes($value);
    }
    while (list($key, $value) = each($_POST)) {
        $_POST[$key] = array_stripslashes($value);
    }
    while (list($key, $value) = each($_REQUEST)) {
        $_REQUEST[$key] = array_stripslashes($value);
    }
}
foreach ($_REQUEST as $key => $value) {
    if (is_array($value)) {
        $value = array_map('addslashes', $value);
    } else {
        $value = addslashes($value);
    }
    $_REQUEST[$key] = $value;
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:function.variables.php

示例6: array_stripslashes

/**
 * This function will walk recursivly thorugh array and strip slashes from scalar values
 *
 * @param array $array
 * @return null
 */
function array_stripslashes(&$array)
{
    if (!is_array($array)) {
        return;
    }
    foreach ($array as $k => $v) {
        if (is_array($array[$k])) {
            array_stripslashes($array[$k]);
        } else {
            $array[$k] = stripslashes($array[$k]);
        }
        // if
    }
    // foreach
    return $array;
}
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:22,代码来源:general.php

示例7: bindtextdomain

        # set LC_ALL to de_DE
        bindtextdomain('messages', LANGDIR);
        bind_textdomain_codeset('messages', 'UTF-8');
        textdomain('messages');
        header('Content-type: text/html; charset=UTF-8', true);
    }
}
/**
 * Strip slashes from GET, POST, and COOKIE variables if this
 * PHP install is configured to automatically addslashes()
 */
if (@get_magic_quotes_gpc() && (!isset($slashes_stripped) || !$slashes_stripped)) {
    array_stripslashes($_REQUEST);
    array_stripslashes($_GET);
    array_stripslashes($_POST);
    array_stripslashes($_COOKIE);
    $slashes_stripped = true;
}
# Create our application repository variable.
$app['server'] = $_SESSION[APPCONFIG]->getServer(get_request('server_id', 'REQUEST'));
/**
 * Look/evaluate our timeout
 */
if (!$app['server']->isSessionValid()) {
    system_message(array('title' => _('Session Timed Out'), 'body' => sprintf('%s %s %s', _('Your Session timed out after'), $app['server']->getValue('login', 'timeout'), _('min. of inactivity. You have been automatically logged out.')), 'type' => 'info'), sprintf('index.php?server_id=%s&refresh=SID_%s', $app['server']->getIndex(), $app['server']->getIndex()));
    die;
}
# If syslog is enabled, we need to include the supporting file.
if ($_SESSION[APPCONFIG]->getValue('debug', 'syslog')) {
    require LIBDIR . 'syslog.php';
}
开发者ID:dannylsl,项目名称:phpLDAPadmin,代码行数:31,代码来源:common.php

示例8: configure

 protected function configure()
 {
     @mb_internal_encoding('UTF-8');
     @ini_set('default_charset', 'utf-8');
     @ini_set('register_globals', 'off');
     // magic quotes
     @ini_set("magic_quotes_runtime", 0);
     if (version_compare('5.4', PHP_VERSION, '>') && function_exists('set_magic_quotes_runtime') && get_magic_quotes_runtime()) {
         @set_magic_quotes_runtime(false);
     }
     // IIS
     if (!isset($_SERVER['REQUEST_URI'])) {
         $_SERVER['REQUEST_URI'] = $_SERVER['PHP_SELF'];
         if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING'])) {
             $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
         }
         self::$system_options['mod_rewrite'] = false;
     }
     if (!get_magic_quotes_gpc()) {
         return;
     }
     function array_stripslashes($array)
     {
         return is_array($array) ? array_map("array_stripslashes", $array) : stripslashes($array);
     }
     $_GET = array_stripslashes($_GET);
     $_POST = array_stripslashes($_POST);
     $_COOKIE = array_stripslashes($_COOKIE);
     $_REQUEST = array_stripslashes($_REQUEST);
 }
开发者ID:Lazary,项目名称:webasyst,代码行数:30,代码来源:waSystemConfig.class.php

示例9: array_stripslashes

/**
 * Strips all slashes from the specified array in place (pass by ref).
 * @param Array $array The array to strip slashes from, typically one of
 *             $_GET, $_POST, or $_COOKIE.
 */
function array_stripslashes(&$array)
{
    if (DEBUG_ENABLED) {
        debug_log('array_stripslashes(): Entered with (%s)', 1, $array);
    }
    if (is_array($array)) {
        while (list($key) = each($array)) {
            if (is_array($array[$key]) && $key != $array) {
                array_stripslashes($array[$key]);
            } else {
                $array[$key] = stripslashes($array[$key]);
            }
        }
    }
}
开发者ID:SalokineTerata,项目名称:intranet,代码行数:20,代码来源:functions.php

示例10: array_stripslashes

function array_stripslashes(&$var)
{
    if (is_array($var)) {
        foreach ($var as $k => &$v) {
            array_stripslashes($v);
        }
    } else {
        $var = stripslashes($var);
    }
    return $var;
}
开发者ID:994724435,项目名称:Ride,代码行数:11,代码来源:xiunophp.php

示例11: strip_if_magic

/**
 * Strips slashes from a var if magic_quotes_gqc is enabled
 *
 * @param mixed $data
 * @return mixed
 */
function strip_if_magic($data)
{
    if (MAGIC_QUOTES_GPC == true) {
        return array_stripslashes($data);
    } else {
        return $data;
    }
}
开发者ID:notzen,项目名称:e107,代码行数:14,代码来源:core_functions.php

示例12: substr

                // View_
                require_once VIEWS_PATH . substr($classPath, 5);
                break;
            case 5:
                // Model_
                require_once MODELS_PATH . substr($classPath, 6);
                break;
        }
    }
}
set_error_handler(create_function('$errno, $errstr, $errfile, $errline', '
	throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
'), E_ALL & ~E_NOTICE);
function array_stripslashes($item)
{
    return is_array($item) ? array_map('array_stripslashes', $item) : stripslashes($item);
}
if (get_magic_quotes_gpc()) {
    if ($_GET) {
        $_GET = array_stripslashes($_GET);
    }
    if ($_POST) {
        $_POST = array_stripslashes($_POST);
    }
    if ($_COOKIES) {
        $_COOKIES = array_stripslashes($_COOKIES);
    }
    if ($_REQUEST) {
        $_REQUEST = array_stripslashes($_REQUEST);
    }
}
开发者ID:kstep,项目名称:pnut,代码行数:31,代码来源:loader.php

示例13: array_stripslashes

function array_stripslashes(&$array)
{
    while (list($key, $var) = each($array)) {
        if ((strtoupper($key) != $key || '' . intval($key) == "{$key}") && $key != 'argc' && $key != 'argv') {
            if (is_string($var)) {
                $array[$key] = stripslashes($var);
            }
            if (is_array($var)) {
                $array[$key] = array_stripslashes($var);
            }
        }
    }
    return $array;
}
开发者ID:retanoj,项目名称:webshellSample,代码行数:14,代码来源:47e82e4609c2ebf409076c538fac7a3b.php


注:本文中的array_stripslashes函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。