[最新 谁在乎昵称呢 的回答] 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=$1 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方法。。
时间:6年前
tom_cheng
极客学院的不推荐
5年前 添加回复 0