A thinkphp entry-level question

Source: Internet
Author: User
I am a newbie to thinkphp entry-level question. I encountered a problem when I tested thinkphp today. please kindly advise: the code is very simple and there is only one IndexAction (automatically generated ), there is an index method and a test method in it. the url mode I use is the rewrite mode ('URL _ Model' & nbsp; = & gt; & n a thinkphp entry-level question
I am a newbie. I am confused when I was studying thinkphp in my test today. please kindly advise:
The code is very simple. there is only one IndexAction (automatically generated), which contains an index method and a test method. the url mode I use is the rewrite mode ('URL _ model' => 2 ), the rewrite rules have been written, but they are always unsuccessful when accessing the test method. according to the manual, it should be http://www.admin.me/index/test. however, the test always reports an error: allow unauthorized access :test (regardless of the case at the beginning of index). why? Isn't the first parameter the module name, and the second parameter the operation name? How can there be two indexes here? My project folder is an App. please kindly advise on the file structure !! Share:
------ Solution --------------------
The first one is the total entry file, the second index is your controller, that is, the file that inherits the action, and the third test is your method, that is, the code block function to be processed, I don't know. Are you clear about this ??? Hope to help you
------ Solution --------------------
So you added the index. php file to the file in the same directory as THINK? You should write something in it,


define('THINK_PATH','./ThinkPHP/');

define('APP_PATH','./home/');

define('APP_NAME','home');


require THINK_PATH.'ThinkPHP.php';


App::run();

?>

You can see that there are a lot of configuration in the configuration of TP. you should not thank the method first. after completing the configuration, you will see the welcome interface and then go to the following ".

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.