<% Function getMappedFileAsString(byVal strFilename) Const ForReading = 1 Dim fso Set fso = Server.CreateObject("scripting.FilesystemObject") Dim ts Set ts = fso.OpenTextFile(Server.MapPath(strFilename), ForReading) getMappedFileAsString = ts.ReadAll ts.close Set ts = nothing Set fso = Nothing End Function Select Case cstr(session("pc")) Case "1" incfile="../ttasp/common/ttasp_print_select.inc" Case "2" incfile="../ttasp/common/ttasp_print_select2.inc" Case "3" incfile="../ttasp/common/ttasp_print_select3.inc" Case else incfile="../ttasp/common/ttasp_print_select.inc" End Select strInclude = getMappedFileAsString(incfile) Execute strInclude %>
inc文件只能是代码块 不能包含代码块开始结束符
热门信息
阅读 (107)
1 ASP+AJAX实现分页效果[Z]阅读 (107)
2 用ASP删除文件阅读 (106)
3 [jQuery1.9]Cannot read property ‘msie’ of undefined错误的解决方法阅读 (106)
4 ASP 微信公共平台接口实现代码阅读 (105)
5 提高IIS+ASP网站安全性的方法