首先
下载nginx服务器 http://nginx.p2hp.com/
下载php https://www.php.net/downloads
然后下载完nginx服务器之后打开目录 打开conf目录 有一个nginx.conf文件nginx的配置文件 打开之后 在http{}里的server{}里 加上
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
这段代码 如果有的话就取消注释就可以了 然后location里
location / {
root html;
index index.html index.php index.htm;
}
加上index.php 然后就是php 打开php配置文件php.ini
cgi.fix_pathinfo=0 这个设置0
doc_root = "C:\Users\