Using pure PHP code to implement page pseudo-static method, PHP
This article describes the method of implementing page pseudo-static using pure PHP code. Share to everyone for your reference. Specific as follows:
if (1==urlrole) { $nav =$_server["Request_uri"]; $script _name=$_server["Script_name"]; $nav 1=ereg_replace (". html", "", Substr (Ereg_replace ("$script _name", "", UrlDecode ($nav)), 1)); $vars = @explode ("/", $nav 1); $_url = Array_chunk ($vars, 2); $_get[' m '] = $vars [0]? $vars [0]: ' index '; If there are no parameters, the default Access index class Library's index method $_get[' a '] = $vars [1]? $vars [1]: ' Index '; Unset ($_url[0]); if ($_url) { foreach ($_url as $key = = $val) { @$_get[$val [0]] = $val [1]; } } Var_dump ($_get);}
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/1038588.html www.bkjia.com true http://www.bkjia.com/PHPjc/1038588.html techarticle using pure PHP code to implement page pseudo-static method, PHP This article describes the use of pure PHP code to implement page pseudo-static method. Share to everyone for your reference. Specific as follows: if (1 ...