Thinkphp can load the default module and cannot load the additional Module. what is the reason for thinkphp following the video example,
If you use the following url, IndexAction. class. php can run
Http: // localhost/thinkp/Admin. php/
However, enter http: // localhost/thinkp/Admin. php/User/index/
Or
Http: // localhost/thinkp/Admin. php/User/index/
All of the following problems
Error location: FILE: E: \ wamp \ www \ thinkp \ ThinkPHP \ Lib \ Think \ Core \ App. class. php LINE: 297
[Error message]
Unable to load module User
[TRACE]
[15-07-19 01:18:07] E: \ wamp \ www \ thinkp \ ThinkPHP \ Lib \ Think \ Core \ App. class. php (297) App: exec ()
[15-07-19 01:18:07] E: \ wamp \ www \ thinkp \ admin. php (12) App: run ()
The admin. php file is in the root directory.
Define ('app _ name', 'admin ');
Define ('app _ path', 'admin ');
Define ('think _ path', './thinkphp ');
Require THINK_PATH. '/ThinkPHP. php ';
App: run ();
?>
Put the UserAction file and IndexAction. class. php in the Action directory.
E: \ wamp \ www \ thinkp \ Admin \ Lib \ Action \ UserAction. class. php
Class UserAction extends Action {
Function index (){
Echo 'User list ';
}
Function add (){
Echo 'user/add ';
}
}
?>
Reply to discussion (solution)
I suggest you carefully read the development manual http://document.thinkphp1.cn/manual_3_2.html
The APP_PATH definition is incorrect. check the manual. It is better to learn from videos and manuals. many videos cannot be mentioned.
However, enter http: // localhost/thinkp/Admin. php/User/index/
Or
Http: // localhost/thinkp/Admin. php/User/index/
All of the following problems
Are these two different?
Define ('app _ name', 'admin'); Admin should be folder.
Http: // localhost/thinkp/Admin/User/index.