您好,欢迎访问一九零五行业门户网

关于lnmp下搭thinkPHP无法找打指定静态页面(求答案)(急)

我在lnmp 下架了一个thinkphp框架对应的小网站,非常奇怪,在环境都配置好后(配置文件里默认模块是index,默认方法是index),我在url里输入localhost:10007/index.php/member/login,正常来说应该显示login.html,但是显示的是index.html的页面,只是样式都不对,查看源代码后发现样式路径是这样的,/index.php/index.php/member/index/tpl/css/style.css,后来我config.php里的配置项改了如下:
'default_module'=>'member', //设置默认的控制器名称
'default_action'=>'login', //设置默认的方法名称
又回无论url输入什么都总停留在login.html对应页,但是样式不对,产看原代码后发现样式路径是这样的,/index.php/index.php/index/index/tpl/css/passport.min.css
总之,好像我的'default_module'和'default_action'配置项配置成什么,url无论输入什么都回显示与配置文件中默认的模块和方法对应的html文件
而且,应该也不是框架的问题,我从新下了个最新版本的thinkphp,也不行,这次连index.html页面也显示不出来
我感觉就是我的那里配置不对,,但是又找不到!!!
主要的目录结构是这样:
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框架)
      index.php
index.php内容如下
config.php页面
'配置值' 'default_module'=>'index', //设置默认的控制器名称 'default_action'=>'index', //设置默认的方法名称 'app_debug'=>true, //开启调试模式 'tmpl_l_delim'=> '{{', // 模板引擎普通标签开始标记 'tmpl_r_delim'=> '}}', // 模板引擎普通标签结束标记 'url_model'=> 0, 'db_name'=> 'route', 'db_prefix'=> 'p_', 'tmpl_engine_type'=>'smarty', 'token_on'=>false, 'token_name'=>'__hash__', 'token_type'=>'md5', 'db_fieldtype_check'=>false, 'tmpl_engine_config'=>array( 'caching'=>false, 'template_dir'=>tmpl_path, 'compile_dir'=>cache_path, 'cache_dir'=>temp_path, 'left_delimiter'=>{{, 'right_delimiter'=>}} ), 'tmpl_action_error' => tmpl_path.'default/public/error.html', // 默认错误跳转对应的模板文件 'tmpl_action_success' => tmpl_path.'default/public/success.html',);?>
indexaction.class.php页面
display(); }}?>
memberaction.class.php页面
display(); }}
index.html  和  login.html 是内容不同的两个静态页面
回复讨论(解决方案) 原来是因为nginx下默认不支持thinkphp的url的pathinfo 模式,,需要更改nginx的配置文件
apache和nginx是存在很多差?的,不可相同?之
如果?nginx缺少?解的?最好是?用,否?就像csdn一?常常出? 50x 的
恩,apache与nginx之间有很多差异,比如说rewrite重写规则就有一定的差异...
如果有人也遇到同样问题,可以参考这个网址,,但我没成功,我不是完全按他的来的。。http://blog.fity.cn/post/416/
恩,,回头学习下nginx以后肯定会经常接触
其它类似信息

推荐信息