在端口 9000 上运行 php-cgi
Netstat 给了我TCP 127.0.0.1:9000 DESKTOP-xxxxxxx:0 LISTENING
[php-cgi.exe]
配置文件
http://pastebin.com/wkfz8wxw
每个 php 文件都给我这个 No input file specified.
错误...
已更改 SCRIPT_FILENAME
至 SCRIPT_NAME
没有成功..
我在 Windows 10 家庭版 x64
最佳答案
您需要使用 root
设置文档根目录指令,或者在您的 location ~ \.php$
中阻止或从外部继承server
堵塞。
解决方案可能是移动root c:/Users/Youri/PhpstormProjects;
线出你的location /
挡在它上面的位置。
通常 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
是指定脚本完整路径的正确方法,而 SCRIPT_NAME
通常只是最后一个元素。
像这样:
server {
...
root c:/Users/Youri/PhpstormProjects;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
关于Nginx,fastcgi PHP Windows,未指定输入文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35050957/