简体   繁体   English

Nginx hiphop php-动态分配服务器变量如何?

[英]Nginx hiphop php - Assign Server variables dynamic how to?

We are trying to make use of hiphop php for our domain. 我们正在尝试将hiphop php用于我们的域。 We are using nginx running in port 80, and hiphop in port 4247, in our PHP code we have used few server variables like DOCUMENT_ROOT, HTTP_TRUE_CLIENT_IP etc., the problem here is, the server variables are not taking the appropriate value. 我们使用在端口80上运行的nginx,在端口4247上运行的hiphop,在我们的PHP代码中,我们使用了一些服务器变量,例如DOCUMENT_ROOT,HTTP_TRUE_CLIENT_IP等,这里的问题是,服务器变量未采用适当的值。 In few google search i came to know that we can specify server variables (under ServerVariables) while starting the hiphop compiled source as server, but i want to know is there any other way we can make it dynamic? 在少数Google搜索中,我知道我们可以在将hiphop编译的源作为服务器启动时指定服务器变量(在ServerVariables下),但是我想知道是否还有其他方法可以使它动态化?

If you need dynamic variables, why do they have to be in $_SERVER? 如果需要动态变量,为什么必须将它们放在$ _SERVER中? Shouldn't you just make a function to figure them out? 您不应该只是提供一个功能来解决它​​们吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM