请问个$_server["http_host"]的有关问题

WBOY
Release: 2016-06-13 10:37:35
Original
905 people have browsed it

请教个$_server["http_host"]的问题
网址是test.com,前面没有www

在IE下用$_server["http_host"]获取当前网址,输出是compatible这个字符串
如果把网址前加上www,就是当网址为www.test.com有事可以正确获取到网址的

在火狐和google的浏览器下两种情况是正常的

------解决方案--------------------
不可能。php怎么会跟ie有搭关系呢。。。
------解决方案--------------------
楼主说的什么。。。
------解决方案--------------------
不可能啊,把代码帖上来。php怎会跟ie有关系。

探讨

引用:

不可能。php怎么会跟ie有搭关系呢。。。

就是获取当前网址呀
ie下如果网址前面没有www就获取不到正确网址
但火狐可以

------解决方案--------------------
探讨

多谢LS几位关注
愿意是后台有2个变量没有定义就直接使用,结果在IE下不可以执行,但火狐可以

看来JS下前台后台都不要偷懒省略变量的定义
Related labels:
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!