相关疑难解决方法(0)

仍然需要为FCGI使用"状态:404未找到"?

通常,当从PHP发送http状态标头时,会发送HTTP标头,如下所示:

header("HTTP/1.0 404 Not Found");
Run Code Online (Sandbox Code Playgroud)

但是,PHP手册说,对于FCGI主机,需要发送一个"Status"标头,然后由FCGI模块转换为HTTP标头:

header("Status: 404 Not Found");
Run Code Online (Sandbox Code Playgroud)

我在Windows 7机器上使用mod_fcgi在PHP上运行apache 2.2并且使用刚才发送头文件header("HTTP/1.0 404 Not Found");似乎工作正常.

这最近发生了变化吗?我还需要Status为FCGI主机发送标头吗?任何人都可以为其他平台(solaris,linux)和其他网络服务器(nginx,lighttp)确认这一点吗?

php http-status-codes http-headers

5
推荐指数
1
解决办法
1667
查看次数

标签 统计

http-headers ×1

http-status-codes ×1

php ×1