Home  >  Q&A  >  body text

Why can't I access this list method?

After modifying ACTION_SUFFIX in config.php to Action, the path index.php/Home/Idex/list cannot be passed. Is it related to my environment? I don’t use apache but only use nginx.


谁在乎昵称呢谁在乎昵称呢2587 days ago1139

reply all(2)I'll reply

  • 谁在乎昵称呢

    谁在乎昵称呢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;
            }
    }

    Later, I changed the nginx configuration to this, but it is different from the tutorial. The list method is accessed through http://tp5.com/Home/Index/list. .


    reply
    1
  • ringa_lee

    ringa_lee2017-08-21 18:03:30

    Project directory problem, you can adjust it again

    reply
    0
  • Cancelreply