Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以 在PHP CLI$_SERVER['HOSTNAME']中获取值,但是在 nginx 中,我得到的值为空,显示“无值”。如何在 nginx 中获取值?phpinfo()
$_SERVER['HOSTNAME']
phpinfo()
您可以使用变量在fastcgiparams中进行设置。$hostname
$hostname
看看这个wiki.nginx.org/HttpCoreModule#.24hostname