救助:为什么调用不出来ASP文件

 1   
 2a = month(now())   
 3if a < 10 then   
 4aa=0&a   
 5end if   
 6  
 7b = day(now())   
 8if b < 10 then   
 9bb=0&b   
10end if   
11filename=aa&bb&".asp"   
12response.Write filename   
13response.write "

<a href='day/"&amp;filename&amp;"' target="_top">历史上的今天</a>

1"   

运行结果是:
Active Server Pages 错误 'ASP 0126'

找不到包含文件

/other/historic/index.asp,行32

找不到包含文件 '``` filename

 1  
 2  
 3请问这怎么解决。我要打开0507.ASP这个文件。   
 4  
 5  
 6  
 7\---------------------------------------------------------------
 8<!--#include file="```
 9filename
10```"-->
11这样不可以   
12include不能用变量   
13\---------------------------------------------------------------   
14  
15用Server.Execute   
16Server.Execute是执行另一个页面,然后将控制返回原来的页面。在新的页面里可访问原来页面的环境,包括Response 和Request等所有ASP对象,但是不能访问页面范围的变量。   
17\---------------------------------------------------------------   
18  
19不可以直接这样吧,你达到什么目的?为什么不把0507.asp直接贴过来,一定要用包含文件,写出来可以想想是否有其他办法   
20\---------------------------------------------------------------   
21  
22Server.Execute是asp3.0的新技术,允许在服务器上转换页面而不需要新的客户端的请求   
23和include效果有些像   
24\---------------------------------------------------------------   
25  
26response.redirect filename
Published At
Categories with Web编程
Tagged with
comments powered by Disqus