ASP常用函数:CStrIP()
ASP常用函数:CStrIP()
发布时间:2016-12-29 来源:查字典编辑
摘要:作用:把长整型数字转为IP地址

作用:把长整型数字转为IP地址

<%

FunctionCStrIP(ByValanNewIP)

DimlsResults

DimlnTemp

DimlnIndex

ForlnIndex=3To0Step-1

lnTemp=Int(anNewIP/(256^lnIndex))

lsResults=lsResults&lnTemp&"."

anNewIP=anNewIP-(lnTemp*(256^lnIndex))

Next

lsResults=Left(lsResults,Len(lsResults)-1)

CStrIP=lsResults

EndFunction

%>

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新ASP教程学习
热门ASP教程学习
编程开发子分类