我怎么没有办法访问这个list方法呢?
谁在乎昵称呢
谁在乎昵称呢 2017-08-21 16:57:36
0
2
1136

修改config.php中的ACTION_SUFFIX为Action后,无法通过路径index.php/Home/Idex/list,是与我的环境有关系吗,没有使用apache只是使用了nginx。


谁在乎昵称呢
谁在乎昵称呢

全部回复(2)
谁在乎昵称呢
server {
        listen 80;
        charset utf-8;
        root D:/data/tp3/;
        index   index.php index.html index.htm;
        server_name tp5.com;
        location / {
        try_files $uri $uri/ /index.php;
        if (!-e $request_filename) {
        rewrite ^(.*)$ /index.php?s= last;
        break;
        }
        }
        location ~ \.php$ {
         include fastcgi_params;
        fastcgi_pass   php_processes;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        }
}

后来把nginx配置改成这样才可以,不过跟教程上讲的不一样,是通过http://tp5.com/Home/Index/list才访问到list方法。。


ringa_lee

项目目录问题,你可以再调整一下

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!