Home  >  Article  >  Backend Development  >  nginx服务器配置

nginx服务器配置

WBOY
WBOYOriginal
2016-06-06 20:21:451047browse

在apache下,我html嵌入的PHP部分能够在网页中顺利输出结果。

但是在nginx下,我同样的是一个html嵌入PHP,但是在浏览器中无法显示PHP输出的结果,PHP部分不能解析。

请问下这是为什么呢?

回复内容:

在apache下,我html嵌入的PHP部分能够在网页中顺利输出结果。

但是在nginx下,我同样的是一个html嵌入PHP,但是在浏览器中无法显示PHP输出的结果,PHP部分不能解析。

请问下这是为什么呢?

看看是不是文件名后缀的问题。

另外检查一下nginx的设置文件有没有设置FastCGI。

首先判断 nginx + php 的时 php 能不能运行,然后在考虑 php + html 混合的情况

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn