环境配置

下载phpstudy https://www.xp.cn/

安装完成之后打开,在软件管理中安装 nginx mysql 5.7 php 7.4

创建站点

填写域名,根目录选择到public文件夹下

创建完成之后,点击右侧管理,选择伪静态

location / { 
   if (!-e $request_filename) {
   rewrite  ^(.*)$  /index.php?s=/$1  last;
   break;
    }
}

本页目录