关于时间处理的Asp问题?

sunny2004 2004-08-04 09:10:55
请教大家问题。现在有7的静态文件,比如1.htm—7.htm。
要求周一至周日7天中每天自动的去调用这7个文件中的一个。比如周一调用1.htm、周二调用2.htm,以此类推。
要求每天的凌晨12点钟更新调用。
请问用Asp我应该如何做。
...全文
171 14 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
dwowbaaa 2004-10-10
  • 打赏
  • 举报
回复
很简单就一句

<%response.redirect(""&WeekDay(mydate)&".htm")%>

有错打我
zlj113 2004-10-10
  • 打赏
  • 举报
回复
response.redirect "1.htm"

文件名加上引号
smalle 2004-10-10
  • 打赏
  • 举报
回复
少了双引号,应该是
<%
response.redirect("1.htm")

%>
SDLin 2004-10-10
  • 打赏
  • 举报
回复
kinglately(王道士)是正确的!
sjjf 2004-10-10
  • 打赏
  • 举报
回复
或者路径没设置对.
sjjf 2004-10-10
  • 打赏
  • 举报
回复
kinglately(王道士)是正确的,你的1-7的html的位置放错了。
littlejc2 2004-10-10
  • 打赏
  • 举报
回复
这个问题还没有解决吗,惨一个,口黑口黑
sunny2004 2004-08-04
  • 打赏
  • 举报
回复
我用 kinglately(王道士) 写的方法,
先建立文件:test.asp 内容为:
<%
dim mydate
dim weekday1
mydate=date
weekday1=WeekDay(mydate)
select case weekday1
case 1:response.redirect(1.htm)
case 2:response.redirect(2.htm)
case 3:response.redirect(3.htm)
case 4:response.redirect(4.htm)
case 5:response.redirect(5.htm)
case 6:response.redirect(6.htm)
case 7:response.redirect(7.htm)
end select
%>
然后在同级目录下建立1.htm-7.htm 七个文件。
测试该页面后报错:


无法显示网页
您要访问的网页有问题,无法显示。

--------------------------------------------------------------------------------

请尝试以下操作:

打开 111.111.com 主页,然后查找指向您感兴趣信息的链接。
单击刷新按钮,或以后再试。

单击搜索,寻找 Internet 上的信息。
也可查看相关站点列表。


HTTP 500 - 内部服务器错误
Internet Explorer
littlejc2 2004-08-04
  • 打赏
  • 举报
回复
是啊,不过听听高手有什么话说把
jervis82 2004-08-04
  • 打赏
  • 举报
回复
同意楼上的。
潜水的鱼 2004-08-04
  • 打赏
  • 举报
回复
...每天自动的...

=========
这个不大好实现,纯asp是实现不了的
sunny2004 2004-08-04
  • 打赏
  • 举报
回复
windows的计划任务中如何设定?

用Asp如何实现呢?请帮忙!感激!
kinglately 2004-08-04
  • 打赏
  • 举报
回复
dim mydate
mydate=date
dim weekday
weekday=WeekDay(mydate)
select case weekday
case 1:response.redirect(1.htm)
case 2:response.redirect(2.htm)
case 3:response.redirect(3.htm)
case 4:response.redirect(4.htm)
case 5:response.redirect(5.htm)
case 6:response.redirect(6.htm)
case 7:response.redirect(7.htm)
end select
talkno 2004-08-04
  • 打赏
  • 举报
回复
windows的计划任务中设定吧,写一个东东调用很简单的.

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧