分享一个好东东,动态Include文件 (Dynamic File Inclu(5)
str_code = join(arr_temp,"")
arr_temp = vbnull
end if
end sub
private function readfile(str_path)
dim objfso, objfile
if str_path <> "" then
if instr(str_path,":") = 0 then str_path = server.mappath(str_path)
set objfso = server.createobject("scripting.filesystemobject")
if objfso.fileexists(str_path) then
set objfile = objfso.opentextfile(str_path, 1, false)
if err.number = 0 then
readfile = objfile.readall
objfile.close
end if
set objfile = nothing
end if
set objfso = nothing
end if
end function
private function getbetween(strdata, strstart, strend)
dim lngstart, lngend
lngstart = instr(strdata, strstart) + len(strstart)
if (lngstart <> 0) then
lngend = instr(lngstart, strdata, strend)
if (lngend <> 0) then
getbetween = mid(strdata, lngstart, lngend - lngstart)
end if
end if
end function
end class
%>