| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 506 人关注过本帖
标题:获取环境变量的问题
取消只看楼主 加入收藏
话真尘
Rank: 1
等 级:新手上路
帖 子:20
专家分:0
注 册:2010-5-21
结帖率:75%
收藏
已结贴  问题点数:10 回复次数:0 
获取环境变量的问题
<body>
<%
function system(text)
 if instr(text,"nt 5.2")>0 then
  system="windows 2003"
  elseif instr(text,"nt 5.1")>0 then
  system="windows xp"
   elseif instr(text,"nt 5")>0 then
   system="windows 2000"
    elseif instr(text,"nt 4")>0 then
    system="windows nt4"
     elseif instr(text,"nt 4.9")>0 then
     system="windows 4.9"
      elseif instr(text,"nt me")>0 then
      system="windows me"
       elseif instr(text,"nt 98")>0 then
       system="windows 98"
        elseif instr(text,"nt 95")>0 then
        system="windows 95"
        else
        system="未知"
    end  if   
end function   
function  browser (text)
   if  instr(text,"MSIE6.0")>0  then
     browser ="internet Ezplorer 6.0"
    elseif  instr(text,"MSIE5.5")>0  then
     browser ="internet Ezplorer 5.5"
    elseif  instr(text,"MSIE5.01")>0  then
     browser ="internet Ezplorer 5.01"
    elseif  instr(text,"MSIE5.0")>0  then
     browser ="internet Ezplorer 5.0"
    elseif  instr(text,"MSIE4.0")>0  then
     browser ="internet Ezplorer 4.0"
    else  browser="unknown"
   end  if
end  function
ip=request.ServerVariables("remote addr")
os ie=request.ServerVariables("http user agent")        
os=system(os ie)
ie=browser(os ie)
iip array=split(ip,".")
iip=iip array(0)&"."&iip array(1)&"."&iip array(2)&".*"
ip=mid(ip,1,instrrev(ip,"."))&"*"
response.write"访问者的ip:"&ip&"<br>"
response.write"访问者的机器环境:"&os ie&"<br>"
response.write"访问者的炒作系统:"&os&"<br>"
response.write"访问者的浏览器型号"&ie&"<br>"
%>   
</body>
</html>

这个有什么问题啊?
搜索更多相关主题的帖子: 环境变量 获取 
2010-06-01 20:06
快速回复:获取环境变量的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011541 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved