本文整理汇总了PHP中CI_Input::_sanitize_globals方法的典型用法代码示例。如果您正苦于以下问题:PHP CI_Input::_sanitize_globals方法的具体用法?PHP CI_Input::_sanitize_globals怎么用?PHP CI_Input::_sanitize_globals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CI_Input
的用法示例。
在下文中一共展示了CI_Input::_sanitize_globals方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
function _sanitize_globals()
{
$ignore_csrf = config_item('csrf_ignore');
if (is_array($ignore_csrf) && count($ignore_csrf)) {
global $URI;
$haystack = $URI->uri_string();
foreach ($ignore_csrf as $needle) {
if (strlen($haystack) >= strlen($needle) && substr($haystack, 0, strlen($needle)) == $needle) {
$this->_enable_csrf = FALSE;
break;
}
}
}
parent::_sanitize_globals();
}
示例2:
/**
* Extend _sanitize_globals to allow css
*
* For action requests we need to fully allow GET variables, so we set
* an exception in EE_Config. For css, we only need that one and it's a
* path, so we'll do some stricter cleaning.
*
* @param string
* @return string
*/
function _sanitize_globals()
{
$_css = $this->get('css');
parent::_sanitize_globals();
if ($_css) {
$_GET['css'] = remove_invisible_characters($_css);
}
}
示例3:
function _sanitize_globals()
{
$this->allow_get_array = TRUE;
parent::_sanitize_globals();
}
示例4: _sanitize_globals
protected function _sanitize_globals()
{
$_POST = $this->all();
parent::_sanitize_globals();
}