Problems with the default module,controller,action settings for TP

Source: Internet
Author: User


The default Access module

' Default_module ' = ' Home ',

The default controller is index

The default action is index


When you explicitly set the index.php in the Home portal file

$_get[' m ']= ' Home ';

$_get[' C ']= ' Index ';

This behavior appears to be superfluous (because this is the default configuration),

In PathInfo mode, the following links do not have problems

http://localhost/tp/index.php/home/user/login/username/aaa/password/bbb

But in URL normal mode

http://localhost/tp/index.php?m=home&c=user&a=login&username=aaa&password=bbb

Error, because C (Controller) is explicitly specified as index, there are two ways to do this:

Either you comment out $_get[' c ']= ' Index ';

Either you replace the C alias ' Var_controller ' + ' cc ' in the config file,

Problems can be solved


Problems with the default module,controller,action settings for TP

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.