No need to mod_rewrite directly using PHP to implement pseudo static page

Source: Internet
Author: User
Tags explode

Use the following code when your program initializes:
<?php
$PHP 2html_fileurl = $_server["Request_uri"];
$PHP 2html_urlstring = Str_replace ("/", "" ", STRRCHR ($Php 2html_fileurl,"/"));
$PHP 2html_urlquerystrlist = explode ("@", $Php 2html_urlstring);
foreach ($Php 2html_urlquerystrlist as $Php 2html_urlquerystr)
{
$PHP 2html_tmparray = explode ("|", $Php 2HTML_URLQUERYSTR);
$_get[$Php 2html_tmparray[0]] = $Php 2html_tmparray[1];
}
echo ' pseudo static: $_get variable <br/> ';
Print_r ($_get);
?>
Then call the $_get variable in PHP as usual.
How to use the connection:
. php/param1|1234@param2|4321
Same with ****.php?param1=1234&param2=4321.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.