Home  >  Article  >  Backend Development  >  Use php directly to implement pseudo-static pages without mod_rewrite_PHP tutorial

Use php directly to implement pseudo-static pages without mod_rewrite_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:36:12787browse

?php
$Php2Html_FileUrl = $_SERVER["REQUEST_URI"];
$Php2Html_UrlString = str_replace("/", "", strrchr($Php2Html_FileUrl, "/"));
$Php2Html_UrlQueryStrList = explode("@", $Php2Html_UrlString);
foreach($Php2Html_UrlQueryStrList as $Php2Html_UrlQueryStr)
{
$Php2Html_TmpArray = explode("|", $Php2Html_ UrlQueryStr);
$_GET [$Php2Html_TmpArray[0]] = $Php2Html_TmpArray[1];
}
echo false static: $_GET variable
;
print_r($_GET);
?>

Then calling the $_GET variable in php is like normal.
Connection usage:
****.php/param1|1234@param2|4321
The same as ****.php?param1=1234¶m2=4321.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508235.htmlTechArticle?php $Php2Html_FileUrl = $_SERVER["REQUEST_URI"]; $Php2Html_UrlString = str_replace("/", "" , strrchr($Php2Html_FileUrl, "/")); $Php2Html_UrlQueryStrList = explode("@", $Php2Html_Ur...
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