当前位置:编程学习 > asp >>

使用FileSystemObject,举个例子给你

答案:自己看一下,应该比较简单

sub WriteIni(sRoot,sUser,sPassword,sQuota)
Const ftpservdir="C:\Program Files\Serv-U"
dim str(7),sFullPath
if isnull(sQuota) then sQuota=20480
sFullPath=sRoot & "\" & sUser
Set FO=CreateObject("Scripting.FileSystemObject")
Set TF=FO.OpenTextFile( ftpservdir & "\Serv-U.INI", 8, TRUE)
str(0)="[USER=" & sUser & "]"   'UserName
str(1)="Password=" & sPassword     'Password
str(2)="HomeDir=" & sFullPath 'Directory
str(3)="ChangePassword=YES"   
str(4)="QuotaEnable=YES"
str(5)="QuotaMaxCurrent=" & cstr(sQuota) & ",0" 'Quota
str(6)="Access1=" & sFullPath & ",ARWMCDLP" 'Directory
str(7)="Timeout=5" 'TimeOut of Idle
dim i
for i=0 to 7
TF.writeline cstr(str(i))
next
TF.Close
end sub

上一个:关于存储过程分页,我的测试情况
下一个:用ASP做的DNS LOOKUP程序

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,