ASP + Serv-u 实现FTP的代码(2)
tf.WriteLine("Access1=E:\Temp|RLP") '可访问目录,可以不是一个,比如 'Access2=E:\Temp1|RLP'
tf.Close
'--------------------备份原来的INI文件--------------------------
Set f1 = fso.GetFile(iniPath & "\" & iniFileName)
f1.Copy (iniPath & "\" & iniFileName & "._awaysrain.bak")
f1.Delete
'--------------------把生成的临时INI文件改为正式的INI--------------------------
Set f1 = fso.GetFile(iniPath & "\" & iniFileName & "._awaysrain.tmp")
f1.Copy (iniPath & "\" & iniFileName)
f1.Delete
Set fso = nothing
%>
注:以上代码假设ServUDaemon.ini中的格式只有一个域并已经至少有一个用户
测试的ServUDaemon.ini文件结构如下:
==================================
[Domain1]
User1=222|1|0
User2=myfso111|1|0
[USER=222|1]
Password=hwB1ECF70CDAF5DAE2B981AE394EEFCDC0
HomeDir=E:\Temp
RelPaths=1
TimeOut=600
Access1=E:\Temp|RLP
[USER=myfso111|1]
Password=ai9118BFD94A9CE9CF37AE5BAA947ED596
HomeDir=e:\temp
RelPaths=1
TimeOut=600
Access1=E:\Temp|RLP
生成后的文件结构如下
==================================
[Domain1]
User1=222|1|0
User2=myfso111|1|0
User3=myfso222|1|0
[USER=222|1]
Password=hwB1ECF70CDAF5DAE2B981AE394EEFCDC0
HomeDir=E:\Temp
RelPaths=1
TimeOut=600
Access1=E:\Temp|RLP
[USER=myfso111|1]
Password=ai9118BFD94A9CE9CF37AE5BAA947ED596
HomeDir=e:\temp
RelPaths=1
TimeOut=600
Access1=E:\Temp|RLP
[USER=myfso222|1]
Password=ai9118BFD94A9CE9CF37AE5BAA947ED596
HomeDir=e:\temp
RelPaths=1
TimeOut=600
Access1=E:\Temp|RLP
附MD5.ASP
==========================================
<%
Private Const BITS_TO_A_BYTE = 8
Private Const BYTES_TO_A_WORD = 4
Private Const BITS_TO_A_WORD = 32
Private m_lOnBits(30)
Private m_l2Power(30)
Private Function LShift(lValue, iShiftBits)
If iShiftBits = 0 Then
LShift = lValue
Exit Function
ElseIf iShiftBits = 31 Then
If lValue And 1 Then
LShift = &H80000000
Else
LShift = 0
End If
Exit Function
ElseIf iShiftBits < 0 Or iShiftBits > 31 Then
内容版权声明:除非注明,否则皆为本站原创文章。