如果你用的是phpstudy,并且是 nginx 是服务器你需要做的是:
在phpstudy 中找到配置文件 nginx.conf 我的是这个,可能有的是 vhosts.conf 配置文件,只要替换下面这个就行了;
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
}
在网上看到好多下面的这种处理办法
location / {
index index.php index.html index.htm
try_files $uri $uri/ /index.php?$query_string;
}
这种做法,我反正是试了不行,所以,有试过不行的,用的我的办法