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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 11:29:24
Original
918 people have browsed it

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

Related labels:
php
source:php.cn
Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template