asp输出内容里包含include可咋弄啊~ <%response.write("<!--#include file="belly.asp"-->")%>这么写不灵目的是经过asp代码判断后决定引入哪个页面求各位路过不要错过帮忙搞一下 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ...这是Asp。net 。。LZ你帖子放错地方了。。<%response.write("<!--#include file=\"belly.asp\"-->")%> 没有转义吧 这种形式叫:动态调用include 文件。函数:Function include(filename) Dim re, content, fso, f, aspStart, aspEnd Set fso = CreateObject("s cripting.FileSystemObject") Set f = fso.OpenTextFile(server.mappath(filename)) content = f.ReadAll f.Close Set f = Nothing Set fso = Nothing Set re = New RegExp re.Pattern = "^\s*=" aspEnd = 1 aspStart = InStr(aspEnd, content, "<%") + 2 Do While aspStart>aspEnd + 1 Response.Write Mid(content, aspEnd, aspStart - aspEnd -2) aspEnd = InStr(aspStart, content, "%\>") + 2 Execute(re.Replace(Mid(content, aspStart, aspEnd - aspStart -2), "Response.Write ")) aspStart = InStr(aspEnd, content, "<%") + 2 Loop Response.Write Mid(content, aspEnd) Set re = NothingEnd Function调用方法:include("belly.asp") response.write是输入到前端源页面。去掉response.write 你的都是两个字符串了response.write("<!--#include file=""belly.asp""-->")如果不行的话就再把<>符号,换成VB的Ascll码。网上查下,我就不帮你查了 Ext错误 数据提取循环替换.... 郁闷了。。。允许为空的枚举属性和Int型转换的问题!!!! DataSet操作XML的问题 再问一个关于命名空间的问题~~~ 救命呀!!! 急!!关于分布式session读取问题!! input 控件中能不能校验用户手工输入文件的合法性? 银行排队太长,想买个基金都这么难…………散分 在.Net4.5下编译的WPF程序在Windows7下无法运行 刚入行的新手请教JS如何调用runat=server的ID aspnetpage分页问题
<%
response.write("<!--#include file=\"belly.asp\"-->")
%>
没有转义吧
函数:
Function include(filename)
Dim re, content, fso, f, aspStart, aspEnd Set fso = CreateObject("s cripting.FileSystemObject")
Set f = fso.OpenTextFile(server.mappath(filename))
content = f.ReadAll
f.Close
Set f = Nothing
Set fso = Nothing Set re = New RegExp
re.Pattern = "^\s*="
aspEnd = 1
aspStart = InStr(aspEnd, content, "<%") + 2
Do While aspStart>aspEnd + 1
Response.Write Mid(content, aspEnd, aspStart - aspEnd -2)
aspEnd = InStr(aspStart, content, "%\>") + 2
Execute(re.Replace(Mid(content, aspStart, aspEnd - aspStart -2), "Response.Write "))
aspStart = InStr(aspEnd, content, "<%") + 2
Loop
Response.Write Mid(content, aspEnd)
Set re = Nothing
End Function调用方法:
include("belly.asp")
如果不行的话就再把<>符号,换成VB的Ascll码。网上查下,我就不帮你查了