thinkphp URL Path pattern problem

Source: Internet
Author: User

First, the entry file index.php

$_get[' mm ']= ' Admin ';

$_get[' cc ']= ' User ';

$_get[' AA ']= ' abc ';

The above 3 settings must be written in front of this sentence

Require './thinkphp/thinkphp.php ';

Otherwise, the set M c A is invalid


Two

If you use the path of the PathInfo mode, the M c a setting of the portal file is invalid,

If you use the normal mode path, the entry file will overwrite M c A and the parameters on the path.


Third, if you want to omit the entry file index.php

In the httpd.conf configuration file

1. Load mod_rewrite.so Module

2, <directory "D:/phpstudy/apache/cgi-bin" > Under

allowoverride None Change None to all

3. Restart the Apache server (at this point the. htaccess is in effect).

Setup complete, at which point the default entry file is index.php


Iv. If you add a common/conf/config.php in the Setup application directory

' Multi_module ' = False,

The path mode is no longer the original localhost/tp321/index.php/m/c/a

But localhost/tp321/index.php/c/a.


V. If you have added a common/conf/config.php in the Setup application directory

' Default_module ' = ' Admin ',

The default module can still be specified in the Portal file, $_get[' m ']= ' Home ' to override the config.php settings

This article from "thinkphp Study notes" blog, declined reprint!

thinkphp URL Path pattern problem

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.