请教,如何用asp过滤txt文件中重复的手机号码

qmimi163 qmimi163 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
请教,如何用asp过滤txt文件中重复的手机号码

找了一个代码,居然用session,我的号码可是好几万的。

求解




Dim Fso
Dim myFile
Dim strL(100)
Dim i,j,mytxt
i=0
Set Fso = Server.CreateObject("Scripting.FileSystemObject")
Set myFile = Fso.OpenTextFile(Server.MapPath("2.txt"),1,True)
While Not myFile.AtEndOfStream
strL(i)=myFile.ReadLine
flg=1
for j=0 to i-1
if strL(j)=strL(i) then
flg=0
exit for
end if
next
if flg=1 then
session(strL(i))=strL(i) & "<br />"
response.write session(strL(i))
end if
i=i+1
Wend
'response.write session(strl(i))'这里不能打印
myFile.Close
Set myFile = Nothing
Set Fso = Nothing
...全文

相关推荐

评论 10
收藏 已收藏
分享
返回顶部
qmimi163
ASP 28,401 成员 356,940 内容