<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
- <%
- Function CLngIP(ByVal asNewIP)
- Dim lnResults
- Dim lnIndex
- Dim lnIpAry
- lnIpAry = Split(asNewIP, ".", 4)
- For lnIndex = 0 To 3
- If Not lnIndex = 3 Then
- lnIpAry(lnIndex) = lnIpAry(lnIndex) * (256 ^ (3 - lnIndex))
- End If
- lnResultslnResults = lnResults + lnIpAry(lnIndex)
- Next
- CLngIP = lnResults
- End Function
- %>
本文介绍了一种将IPv4地址转换为长整数的方法。通过VBScript编程实现,该函数首先将IPv4地址拆分为四个部分,然后将其转换为长整数格式以便于存储和比较。这种转换对于网络管理和路由表的高效处理尤为重要。

2395

被折叠的 条评论
为什么被折叠?



