For example, if I use a virtual host and want to optimize the url, but I don't have the server permission, I can start with PATH_INFO to visit ingress.
Last time I wrote the Search Engine Friendly URL design-I am tossing on this matter, to implement this http://www.myhost.com/foo.php? A = A & B = B & c = C-> http://www.myhost.com/foo.php/a/a/ B/B /c/c/c's url, and there are also different measures in the upper part.
For example, if I use a virtual host and want to optimize the url, but I do not have the server permission, I can start with PATH_INFO.
Visit the ghost and use php to parse it at this time:
Plain textphp:
If (! Empty ($ _ SERVER ['path _ info']) {
$ Paths = explode ('/', substr ($ _ SERVER ['path _ info'], 1 ));
For ($ I = 0, $ cnt = count ($ paths); $ I <$ cnt; $ I)
$ _ GET [$ paths [$ I] = @ (string) $ paths [$ I];
}
In this way, we can simply convert PATH_INFO into a global $ _ GET array, which has another benefit.
Http://www.myhost.com/foo.php? A = A & B = B & c = C
Http://www.myhost.com/foo.php/a/A/ B/B /c/C
The above url can be visited at the same time, ensuring versatility