<%
dim content'定义centent为变量
content=request("sting")
stringurl=content
filespec = server.mapPath(stringurl)
set fs = server.createobject("scripting.filesystemobject")
set f = fs.openTextFile(filespec)
content = f.readall
set f = nothing
set fs = nothing
response.write(content)
%>
此博客展示了一段ASP代码,通过定义变量接收请求参数,将其作为文件路径映射到服务器实际路径,利用文件系统对象打开文件并读取全部内容,最后输出文件内容。
181





