: PHP pseudo-static page function Appendix usage: functionMakeUrl ($ arr) {foreach ($ arras $ key & gt; $ value) {$ url [] $ key. _. $ value;} $ tmpurlimplode (_, $ url); return $ tmpurl .. h function MakeUrl ($ arr ){
Foreach ($ arr as $ key => $ value ){
$ Url [] = $ key. "_". $ value;
}
$ Tmpurl = implode ("_", $ url );
Return $ tmpurl. ". htm ";
}
Function ParseUrl (){
If ($ _ SERVER ['path _ info']! = ""){
$ Pathinfo = substr ($ _ SERVER ['path _ info'], 1 );
$ Pathinfo = str_replace (". htm", "", $ pathinfo );
$ Path = explode ("_", $ pathinfo );
$ Count = count ($ path );
For ($ I = 0; $ I <$ count; $ I + = 2 ){
$ _ GET [$ path [$ I] = $ path [$ I + 1];
}
}
}
// Use the instance to link to the page
$ Path = "http: // www. ***. com/blog. php /";
$ Path. = MakeUrl (array ('blogid' => 2, 'page' => 1 ));
// Browse the page and call the ParseUrl () function. you can directly use the variable $ _ GET.
If you do not want others to know that your website uses the PHP program for security purposes, configure your httpd. conf file as follows:
But this does not mean PHP is not safe.
You can use the following method to hide the object:
1. hide PHP as another language
Add the following line anywhere in your httpd. conf.
# Make PHP code look like other code types
AddType application/x-httpd-php. asp. py. pl. jsp aspx
2. use an unknown extension for PHP
Add the following line anywhere in your httpd. conf.
# Make PHP code look like unknown types
AddType application/x-httpd-php. bop. foo. 133 t. los. abc
3. use the HTML extension for PHP
Add the following line anywhere in your httpd. conf.
# Make all PHP code look like html
AddType application/x-httpd-php. htm. html
Restart apache. change your PHP file name to the file suffix you set above. open the test...
The above describes how to use PHP pseudo-static page functions, including some content, and hope to be helpful to friends who are interested in PHP tutorials.