日期:2014-05-17 浏览次数:20950 次
<%
Function getFileContents(strIncludeFile) '函数:读取包含文件内容
Dim objFSO,objText
Set objFSO = Server.CreateObject("Scripting.FileSystemObject") '调用FSO对象
Set objText = objFSO.OpenTextFile(Server.MapPath(strIncludeFile))
getFileContents = objText.ReadAll
objText.Close
Set objText = Nothing
'这里要不要增加objFSO.Close?
Set objFSO = Nothing
End Function
response.write getFileContents("123.asp")
%>