redim contenta(0) adSaveCreateOverWrite=2 adSaveCreateNotExist=1
starttag="{" endtag="}" total=0 block_begin_word="BEGIN" block_end_word="END" block_begin_delim="" block_null=" " ’ begin 和end之间用空格隔开 end sub
sub echo (a) response.write a end sub
function readfile(filepath) dim stm2 on error resume next set stm2 =server.createobject("ADODB.Stream") stm2.Charset = "gb2312" stm2.Open stm2.LoadFromFile filepath readfile = stm2.ReadText end function
function writefile(filepath,str)’ 写入文件的函数 dim stm on error resume next Set stm = server.createobject("ADODB.Stream") stm.Charset = "gb2312" stm.Open stm.WriteText str stm.SaveToFile filepath, adSaveCreateOverWrite end function
function SetFile(file)’ 设置文件,读取文件内容 filename=file content=readfile(file) end function
function inarray(val,arr)’val是否在数组arr中 dim tmp,i,rr,re,pt,tt for i =0 to ubound(arr) if arr(i)=val then inarray=i exit function end if next inarray=-1 ’不在数组中. end function
function listarray(arr,str) dim tmp,i,rr,re,pt,tt str=" " & str for i=0 to ubound(arr) echo str & i & ":" & arr(i) & vbcrlf |