What does domain. comindex. phpuser123 mean? How is compatibility? Is this writing standard supported by all PHP servers and browsers? For example
domain.com/index.php/user/123
- What does this statement mean?
- How is compatibility? Are all PHP servers and browsers supported?
- Is this writing standard?
Reply content:
For example
domain.com/index.php/user/123
- What does this statement mean?
- How is compatibility? Are all PHP servers and browsers supported?
- Is this writing standard?
/User/123 is PATH_INFO, which is defined in the CGI specification. Most frameworks use this value for Route rewriting.
I have studied this thing before: http://weizhifeng.net/difference-between-php_self-script_name-script_filename-path_info-and-request_uri.html
CGI specifications can look here: http://www.perlfect.com/articles/cgi_env.shtml
This write is only for convenience of programming, not a standard,
Index. php mainly acts as the Controller in MVC, that is, all requests first go to the index. php file. Implement a single portal. Then, in the index. php file, do the "Hands and feet" and route the requests to the corresponding Handler based on different URLs for specific processing. Example: domain.com/index.php/user/123
Index. php first receives the request, and then transmits the request to the user. inc (Suppose) File Based on the url. The id is 123, and then the file is returned to the browser after processing.
You can rewrite the url.