功能是读取发布目录下的一个ini文件
If flgSection = True Then
If Mid(strLineData,1,7) = "Service" Then
strTempData = Trim(Mid(strLineData,8,Len(strLineData)-7))
If Mid(strTempData,1,1) = "=" Then
strTempData = Trim(Mid(strTempData,2,Len(strTempData)-1))
Application.Lock
Application("Service") = Mid(strTempData,2,Len(strTempData)-2)
Application.UnLock
End If
End If
If Mid(strLineData,1,4) = "User" Then
strTempData = Trim(Mid(strLineData,5,Len(strLineData)-4))
If Mid(strTempData,1,1) = "=" Then
strTempData = Trim(Mid(strTempData,2,Len(strTempData)-1))
Application.Lock
Application("User") = Mid(strTempData,2,Len(strTempData)-2)
Application.UnLock
End If
End If
End If
End If
Wend
objTs.Close
Set objTs = Nothing
Set objFs = Nothing
End Sub
</SCRIPT>
该博客主要介绍了一个功能,即使用ASP读取发布目录下的ini文件。代码中对文件内容进行处理,当遇到以'Service'和'User'开头的行时,提取对应的值并存储到Application对象中,涉及数据的锁定与解锁操作。
569

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



