首页  >  问答  >  正文

我怎么没有办法访问这个list方法呢?

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


谁在乎昵称呢谁在乎昵称呢2586 天前1138

全部回复(2)我来回复

  • 谁在乎昵称呢

    谁在乎昵称呢2017-08-21 18:10:13

    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方法。。


    回复
    1
  • ringa_lee

    ringa_lee2017-08-21 18:03:30

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

    回复
    0
  • 取消回复