/**
* @category Url_type This method is to handle the URL pattern pathinfo mode
*/
function Url_type () {
URL mode Controller--acquisition of methods
$url = $_server[' php_self '). " <br> ";
echo $url, "<br/>";
$num =strpos ("$url", '. php ') +5;
$data = Mb_substr ($url, $num);
$array _url= Explode ("/", $data);
echo "<pre>";
Var_dump ($array _url);
echo "</pre>";
$_get[' C '] = $array _url[0];
$_get[' m '] = $array _url[1];
Fetching of URL pattern parameters
Unset ($array _url[0]);
Unset ($array _url[1]);
Var_dump ($array _url);d ie ();
$nums = count ($array _url);
if ($nums!=0) {//means there are parameters
if ($nums%2 ==0) {
$nums = $nums/2;
for ($i =1; $i <= $nums; $i + +) {
$_get[$array _url[2* $i]] = strip_tags ($array _url[2* $i +1]);
}
}else
Die ("Pro, there is a problem with your parameter settings, please check your link address!") ");
}
}
I simply wrote a PHP processing URL normal mode variable pathinfo mode function