Under the nginx-ThinkPHP3.2, get parameter s = xxx why prompt cannot load controller xxx?

Source: Internet
Author: User
The Url is rg. comAdminindex? In sxxx, s indicates the search keyword. if any value is used to access the above link, the system prompts that the controller cannot be loaded. the error location is FILE: E: phpStudyWWWhgzx_tpThinkPHPLibraryThinkApp.class.phpLINE: 101. http://rg.com/Admin/index?s=xxx
Where sIndicates the search keyword, which may be any value

Access the above link prompt

Unable to load controller: Xxx
Error location
FILE: E: phpStudyWWWhgzx_tpThinkPHPLibraryThinkApp.class.php LINE: 101

This is strange. how does it relate to the controller? The controller is notc?

Public configuration file (Common/Conf/config.php) Content is as follows:

Return array ('URL _ model' => 2, // rewrite mode 'Var _ module' => '_ m ', // The default module obtains the variable 'Var _ controller' => '_ C', // The default CONTROLLER obtains the variable 'Var _ action' =>' _ ', // Get the variable by default );

Why can't I find the cause after reading the framework source code?

Reply content:

The Url ishttp://rg.com/Admin/index?s=xxx
WheresIndicates the search keyword, which may be any value

Access the above link prompt

Unable to load controller: Xxx
Error location
FILE: E: phpStudyWWWhgzx_tpThinkPHPLibraryThinkApp.class.php LINE: 101

This is strange. how does it relate to the controller? The controller is notc?

Public configuration file (Common/Conf/config.php) Content is as follows:

Return array ('URL _ model' => 2, // rewrite mode 'Var _ module' => '_ m ', // The default module obtains the variable 'Var _ controller' => '_ C', // The default CONTROLLER obtains the variable 'Var _ action' =>' _ ', // Get the variable by default );

Why can't I find the cause after reading the framework source code?

Keyword used by the built-in URL of the framework

ThinkPHP/Conf/convention. php contains the following configuration items:

/* Set the system variable name */'Var _ module' => 'm', // The default MODULE obtains the variable 'Var _ ADDON '=> 'addon ', // Default plug-in controller namespace variable 'Var _ controller' => 'C', // The default CONTROLLER obtains the variable 'Var _ action' => 'A ', // Obtain the variable 'Var _ AJAX_SUBMIT '=> 'Ajax' by default. // The default ajax submission variable 'Var _ jsonp_handler' => 'callback ', 'Var _ pathinfo' =>'s ', // The compatible pattern PATHINFO obtains the variable such? The parameters after s =/module/action/id/1 depend on URL_PATHINFO_DEPR 'Var _ template' => 'T ', // the default template switch variable 'Var _ AUTO_STRING '=> false, // whether the input variable is automatically forcibly converted to a string. if it is enabled, the array variable must be manually passed in the variable modifier to obtain the variable.

When using get in tp, a, c, m, s cannot be used. Used by the framework.

Your suffix does not exist. normal connections are in rewrite mode. domain name/controller name/method name/subsequent parameters if such problems occur frequently, we recommend that you use the U method to generate a connection. for example

U ('index/Index', array ('parameter name' => 'parameter value', 'parameter name1' => 'parameter value 1 '));

For more information, see the official documentation.

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.