在线等候,用ASP怎样才能屏蔽IP地址的最后一位。

penglewen 2006-04-14 07:57:02
如题,如得到客户端的IP地址是192.168.0.1而我要他显示出来就是192.168.0.*.
...全文
194 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
akan2005 2006-04-14
  • 打赏
  • 举报
回复
'得到屏幕过的IP
Public Function GetFilterIP(ByVal theIP)
theIP = Left(Left(theIP,InStrRev(theIP,".") - 1),InStrRev(Left(theIP,InStrRev(theIP,".") - 1),".")) & "*" '屏蔽IP最后两个部份
'theIP = Left(theIP,InStrRev(theIP,".")) & "*" '屏蔽IP最后一个部份
GetFilterIP = theIP
End Function
yeaky 2006-04-14
  • 打赏
  • 举报
回复
a=split(ip,".")
ip=a(0)&"."&a(1)&"."&a(2)&".*"
yeaky 2006-04-14
  • 打赏
  • 举报
回复
很多方法可以实现吧
用split可以啊
a=split(ip)
ip=a(0)&"."&a(1)&"."&a(2)&".*"
jspadmin 2006-04-14
  • 打赏
  • 举报
回复
left(str,instrrev(str,".")) & "*"

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧