Home >Backend Development >PHP Tutorial >php中一个函数把我看迷了,求分析

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-02 11:29:24922browse

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不是字符串吗,为什么这样用?(这是一个网站的源码,需要其他源码的我马上发,感觉语法解决不了。。)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn