What does it mean to add a backslash (index. PHP/xx) after php?

Source: Internet
Author: User
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

  1. What does this statement mean?
  2. How is compatibility? Are all PHP servers and browsers supported?
  3. Is this writing standard?

Reply content:

For example

domain.com/index.php/user/123

  1. What does this statement mean?
  2. How is compatibility? Are all PHP servers and browsers supported?
  3. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.