请教,如何用asp过滤txt文件中重复的手机号码
请教,如何用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
找了一个代码,居然用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
...全文
相关推荐
c# 去掉TXT重复手机号码
可以将读取到的手机号码添加到HashSet中,自动过滤重复项。5. **异常处理(try-catch-finally)**:在读取文件时,应该处理可能出现的异常,如文件不存在、权限问题等。
手机号码归属地查询 v2.0-ASP源码.zip
【压缩包子文件的文件名称列表】中,我们看到"内容来自存起来软件站www.cqlsoft.com.txt",这可能是一个文本文件,包含了关于源码的版权信息、使用指南,或者站点对发布此源码的一些声明。
ASP.NET MVC博客网站毕业设计
- 将生成的模板项目文件“MvcBlogNet.zip”保存至指定目录。 - 重复以上步骤,为博客网站中的多个项目分别创建模板文件。
实用的asp短信发送代码.rar
- 缓存处理:对短时间内重复发送的短信,可以考虑缓存处理,避免重复请求。通过以上知识点,开发者可以理解如何在ASP项目中实现短信发送功能,并对提供的代码进行相应的适配和优化。
使用asp发送飞信的免费短信源码
ASP(Active Server Pages)基础:ASP是微软开发的一种服务器端脚本环境,用于生成动态网页。在本案例中,fsend.asp文件是ASP源代码,它包含了发送短信的逻辑。


