首页 > 资讯 > 网站设计
对ASP 动态包含文件方法的改进
发布时间:2008-07-03   浏览次数:1150295
对ASP 动态包含文件方法的改进 ASP本身不支持动态包含文件,现在的动态包含是通过FSO把被包含的文件合并到主文件里再运行。 以下也有把形如的普通包含文件方式称作“传统引用”,用函数实现的动态包含文件称作“动态引用”。常见的程序如下: ★点击设计★ http://www.djasp.Net 专业的WEB编程资讯技术站点,欢迎访问!Functioninclude(filename) Dimre,content,fso,f,aspStart,aspEnd ★点击设计★ http://www.djasp.Net 专业的WEB编程资讯技术站点,欢迎访问!setfso=CreateObject("Scripting.FileSystemObject") setf=fso.OpenTextFile(server.mappath(filename)) content=f.ReadAll f.close setf=nothing setfso=nothing 本文由 点击设计 http://www.djasp.Net 收集整理。谢绝无聊之人转载!setre=newRegExp re.pattern="^\s*=" aspEnd=1 aspStart=inStr(aspEnd,content,"")+2 Execute(re.replace(Mid(content,aspStart, aspEnd-aspStart-2),"Response.Write")) aspStart=inStr(aspEnd,content,"
业务咨询

Copyright 2003 - 2023 huinet.cn All Rights Reserved.
慧网公司 版权所有