Heim >Backend-Entwicklung >PHP-Tutorial >php中一个函数把我看迷了,求分析

php中一个函数把我看迷了,求分析

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-02 11:29:24924Durchsuche

php

function set_global($filter = 'strict')
{
global $global;
$global = array();
//获得url中参数部分 问题:filter是什么????
$global['url'] = $filter($_SERVER['QUERY_STRING']);
if($global['url'] != '')
{
$arr = explode('/',$global['url']);
$global['channel'] = $arr[1];
for($i = 0; $i {
$strpos = strpos($arr[$i],'-');
if($strpos)
{
$key = substr($arr[$i],0,$strpos);
$value = substr($arr[$i],$strpos + 1);
if(!isset($global[$key]))
{
$global[$key] = $value;
}
}
}
}
}
$filter不是字符串吗,为什么这样用?(这是一个网站的源码,需要其他源码的我马上发,感觉语法解决不了。。)

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn