Like what
domain.com/index.php/user/123
- What is the meaning of this writing?
- How is compatibility? are all PHP servers and browsers supported
- Is this a standard notation?
Reply content:
Like what
domain.com/index.php/user/123
- What is the meaning of this writing?
- How is compatibility? are all PHP servers and browsers supported
- Is this a standard notation?
/user/123 is Path_info, which is defined in the CGI specification, and most of the framework uses this value for route rewriting.
I've just studied this before: http://weizhifeng.net/difference-between-php_self-script_name-script_filename-path_info-and-request_uri.html.
The CGI specification can be seen here: http://www.perlfect.com/articles/cgi_env.shtml
This is written just for the convenience of programming, not a standard,
index.php mainly acts as a controller in MVC, that is, all requests first to index.php this file. Implement a single entry. Then do "hands and feet" in the index.php file, according to the request of different URLs, routed to the corresponding handler to do the specific processing. Example: domain.com/index.php/user/123
index.php first receives the request, and then, based on the URL, passes the request to user.inc (assuming) the file, the ID is 123, and is returned to the browser after processing.
URL Rewrite is all you can do