[PHP]
if (Isset ($_server[' path_info ')) {
$str =substr ($_server[' path_info '],0,strpos ($_server[' path_info '], '. '));
Get path information (pathinfo)
$pathinfo =explode ('/', trim ($str, '/'));
Get $_get[' m ']
$_get[' m ']= (!emptyempty ($pathinfo [0])? $pathinfo [0]: ' index ');
To remove the beginning of an array cell
Array_shift ($pathinfo);
Get $_get[' a]
$_get[' A ']= (!emptyempty ($pathinfo [0])? $pathinfo [0]: ' index ');
To remove the beginning of an array cell
Array_shift ($pathinfo);
$num =count ($pathinfo);
for ($i =0; $i < $num; $i +=2) {
$_get[$pathinfo [$i]]= $pathinfo [$i +1];
}
}else{
$_get[' m ']= (!emptyempty ($_get[' m '])? $_get[' m ']: ' index ');
$_get[' A ']= (!emptyempty ($_get[' a '])? $_get[' A ']: ' index ');
if ($_server["query_string"]) {
$m =$_get[' m '];
unset ($_get[' m '); Remove an array of M
$a =$_get[' a '];
unset ($_get[' a '); Remove an array of a
$query =http_build_query ($_get); Compose a new URL parameter
Combine a new URL
$url =$_server[' Script_name ']. " /{$m}/{$a}/". Str_replace (Array (" & "," = "),"/", $query)." HTML "; That's the point.
Header ("Location:". $url);
}
}
if (Isset ($_server[' path_info ')) {
$str =substr ($_server[' path_info '],0,strpos ($_server[' path_info '], '. '));
Get path information (pathinfo)
$pathinfo =explode ('/', trim ($str, '/'));
Get $_get[' m ']
$_get[' m ']= (!empty ($pathinfo [0])? $pathinfo [0]: ' index ');
To remove the beginning of an array cell
Array_shift ($pathinfo);
Get $_get[' a]
$_get[' A ']= (!empty ($pathinfo [0])? $pathinfo [0]: ' index ');
To remove the beginning of an array cell
Array_shift ($pathinfo);
$num =count ($pathinfo);
for ($i =0; $i < $num; $i +=2) {
$_get[$pathinfo [$i]]= $pathinfo [$i +1];
}
}else{
$_get[' m ']= (!empty ($_get[' m '])? $_get[' m ']: ' index ');
$_get[' A ']= (!empty ($_get[' a '])? $_get[' A ']: ' index ');
if ($_server["query_string"]) {
$m =$_get[' m '];
unset ($_get[' m '); Remove an array of M
$a =$_get[' a '];
unset ($_get[' a '); Remove an array of a
$query =http_build_query ($_get); Compose a new URL parameter
Combine a new URL
$url =$_server[' Script_name ']. " /{$m}/{$a}/". Str_replace (Array (" & "," = "),"/", $query)." HTML "; That's the point.
Header ("Location:". $url);
}
}
http://www.bkjia.com/PHPjc/477962.html www.bkjia.com true http://www.bkjia.com/PHPjc/477962.html techarticle [PHP] if (isset ($_server[path_info])) {$str =substr ($_server[path_info],0,strpos ($_server[path_info],.));// Get path information (pathinfo) $pathinfo =explode (/,trim ($STR,/)); Get $_ ...