There are four URL modes in thinkphp. Is PATHINFO mode unique to thinkphp? Does laravel not have such a concept? There are four URL modes in thinkphp. Is PATHINFO mode unique to thinkphp? Does laravel not have such a concept?
Reply content:
There are four URL modes in thinkphp. Is PATHINFO mode unique to thinkphp? Does laravel not have such a concept?
Pathinfo
Of course it is not specific to a framework,Pathinfo
Strictly speaking, it is a predefined variable provided by the HTTP server. In many frameworks, an important component is called a router.Pathinfo
.
Consider the following code:
# Filename:./testpathinfo. php
When I directly request this file (note the address bar ):
If the file is not obtainedPathinfo
This value is not defined when the parameter is set. If I make such a request (pay attention to the address bar ):
Therefore, this function worksRewrite
Function to remove the request file from the address.
In addition, PHP providesPathinfo ()
To extract the path information:
Refer:
PHP manual: pathinfo ()
PHP manual: $ _ SERVER