调用未定义的函数apache_request_headers() [英] Call to undefined function apache_request_headers()

查看:313
本文介绍了调用未定义的函数apache_request_headers()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将脚本切换到其他服务器.在以前的服务器上,它可以完美地工作,现在,我将它们切换到另一台服务器上,我不明白问题所在.

I've just switched my scripts to a different server. On the previous server this worked flawlessly, and now that I've switched them to a different server, I can't understand the problem.

我不确定是否有帮助,但这是相关代码.

I'm not sure it would help, but here's the relevant code.

$headers = apache_request_headers();

PHP版本为:PHP 5.3.2

PHP Version is: PHP 5.3.2

推荐答案

来自

From the docs, before the release of PHP 5.4.0:

仅当PHP作为Apache模块安装时才支持此功能.

This function is only supported when PHP is installed as an Apache module.

PHP 5.4.0和更高版本无条件支持此功能.

PHP 5.4.0 and later support this function unconditionally.

所说的文档还包括替换功能,这些功能通过单步执行$_SERVER来模仿apache_request_headers的功能.

Said docs also include replacement functions that mimic the functionality of apache_request_headers by stepping through $_SERVER.

这篇关于调用未定义的函数apache_request_headers()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆