I lnmp a small thinkphp frame corresponding to the little site, very strange, after the environment is configured (the default module is index in the configuration file, the default method is index), I enter the URL localhost:10007/index.php/member /login, normally should show login.html, but the page is displayed index.html, but the style is not correct, after viewing the source code found that the style path is this,/index.php/index.php/member/index/tpl/ Css/style.css, then I changed the configuration in config.php as follows:
' Default_module ' = ' Member ',//set Default controller name
' Default_action ' = ' login ',//Set default method name
Again no matter what the URL input will always stay in the login.html corresponding page, but the style is not correct, the production of the original code found that the style path is this,/index.php/index.php/index/index/tpl/css/ Passport.min.css
In short, as if my ' default_module ' and ' default_action ' configuration items are configured, the URL will display the HTML file corresponding to the default modules and methods in the configuration file, regardless of the input.
And, should not be the framework of the problem, I new down a new version of the thinkphp, also not, this time even index.html page is not shown
I feel like my place is not configured, but I can't find!!!
The main directory structure is this:
App
Index
Conf
config.php
Common
Lang
Runtime
Lib
Action
IndexAction.class.php
MemberAction.class.php
Tpl
Default
Index
Index.html
Member
Login.html
Js
Css
Images
thinkphp (thinkphp frame)
index.php
index.php content is as follows
config.php page
!--? Phpreturn Array (//' Config item ' =--> ' config value ' default_module ' = ' Index ',//set Default controller Name ' default_action ' = ' index ',//Set default method name ' App_debug ' =>true,//Open debug mode ' Tmpl_l_delim ' = ' {',//template engine plain tag start tag ' tmpl_r_delim ' = ' + '} ',//template engine plain tag end tag ' Url_model ' + 0, ' Db_name ' + ' Route ', ' db_prefix ' = ' p_ ', ' tmpl_engine_type ' = ' Smarty ', ' token_on ' =>false, ' Token_na ME ' = ' __hash__ ', ' token_type ' = ' md5 ', ' Db_fieldtype_check ' =>false, ' Tmpl_engine_config ' =>array ( ' Caching ' =>false, ' template_dir ' =>tmpl_path, ' Compile_dir ' =>cache_path, ' Cache_dir ' =>te Mp_path, ' left_delimiter ' = ' {{', ' right_delimiter ' and '} '} ', ' tmpl_action_error ' + = tmpl_p ATH. ' default/public/error.html ',//default error jump corresponding template file ' tmpl_action_success ' = Tmpl_path. ' default/public/ Success.html ',);?
IndexAction.class.php page
Display (); }}? >
MemberAction.class.php page
Display (); }}
Index.html and login.html are two static pages with different content
Reply to discussion (solution)
The original is because Nginx under the default does not support the thinkphp URL pathinfo mode, you need to change the Nginx configuration file
Apache and Nginx There are many bad, not the same?
If the nginx lacks the solution, it is better to use, no? like CSDN? The 50x??
Well, there are a lot of differences between Apache and Nginx, for example, rewrite rewrite rules have a certain difference ...
If someone also encounters the same problem, can refer to this website, but I did not succeed, I did not exactly according to his come. http://blog.fity.cn/post/416/
Well, after studying the Nginx, I'm sure I'll always be in touch.