nginx服务器配置

WBOY
Release: 2016-06-06 20:21:45
Original
1047 people have browsed it

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

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

请问下这是为什么呢?

回复内容:

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

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

请问下这是为什么呢?

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

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

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

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!