创建网站后访问index/xxx.php出现File not found.

我在HTML中用form标签连接PHP文件,但是点击submit页面就变成File not found.然后我单独访问该目录下的PHP文件也会出现同样的问题。

这是我寻找到的解决办法,但是我找到的nginx.conf配置文件与以上链接中的完全不一样,在同目录下有一个fastcgi-php.conf文件,内容如下:# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+.php)(/.+)$;

Check that the PHP script exists before passing it

try_files $fastcgi_script_name =404;

Bypass the fact that try_files resets $fastcgi_path_info

see: #321 (try_files & $fastcgi_path_info) – nginx

set $path_info $fastcgi_path_info;
#fastcgi_param PATH_INFO $path_info;
fastcgi_read_timeout 3600;

fastcgi_index index.php;

可我并不知道应该怎么改。

是不是创建的静态网站?

是的,我在另一个帖子也回复你了

静态网站不行 得 PHP 运行环境网站