包括基于一周中的一周的页面。 [英] include page based on week of year.

查看:55
本文介绍了包括基于一周中的一周的页面。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须每周更新一页。我提前得到了这个页面所以我使用了

预定包括 Frontpage中的webbot只是为了找到我每周刷新页面以使其工作的
。这很愚蠢,它应该单独运行
。所以......

我在FP小组中提出了这个问题,并且我被提供了这个伪代码

按月完成,如果有可能的话它一周没有

写了52个单独的行,每周一个,每年都会改变

,每年都要重写。


<%If Now()> date(" 1/3/2005")然后%>

<! - #include file =" includes / mar的.asp" - >

<%elseif Now()> date(" 1/2/2005")然后%>

<! - # include file =" includes / feb.asp" - >

<%else%>

<! - #include file =" includes / jan.asp" - >

<%endif%>


现在我的目标是计算
$的哪一周b $ b年份(任何一年)。

即1月1日7日= w1.htm,1月8日至15日= w2.htm等,并为每个人返回一个Wx.htm />
周。

这样我所要做的就是保存一个wx.htm文件,其中x =一年中的一周。

所以...如何我可以知道一年中的哪一周吗?

I have to update a page every week. I get the page ahead of time so I used
the "scheduled includes" webbot in Frontpage only to find that I would have
to refresh the page every week to have it work. That is silly, it should run
by itself. so...
I asked the question in the FP group and I was offered this pseudocode
to do it by month which would work if it''s possible to do it by week without
writing 52 seperate lines, one for each week which would change each year
and have to be rewritten each year.

<% If Now()>date("1/3/2005") then %>
<!-- #include file="includes/mar.asp" -->
<% elseif Now()>date("1/2/2005") then %>
<!-- #include file="includes/feb.asp" -->
<% else %>
<!-- #include file="includes/jan.asp" -->
<% endif %>

Now the goal for me would be something that would calculate which week of
the year (any year) it is.
i.e. Jan 1-7 = w1.htm , Jan 8-15= w2.htm etc. and return a Wx.htm for each
week.
That way all I have to do is save a wx.htm file where x= week of year.
so ... how can I caclulate what week of the year it is?

推荐答案

"。:mmac:。 <丢失@海>在消息中写道

新闻:%2 ****************** @ TK2MSFTNGP09.phx.gbl ...
".:mmac:." <lost@sea> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
我必须每周更新一页。我提前得到了页面,因此我使用了预定包含。 Frontpage中的webbot只是发现我每周必须刷新页面以使其工作。这很愚蠢,它本身应该是
。所以...
我在FP小组中提出了这个问题,并且我被提供了这个伪代码
按月进行,如果可以按周工作,那么这将是有效的。写了52个单独的行,每周一个,每年都会改变
并且必须每年重写。

<%If Now()> date(" 1/3) / 2005")然后%>
<! - #include file =" includes / mar.asp" - >
<%elseif现在()>日期(&#1/2/2005")然后%>
<! - #include file =" includes / feb的.asp" - >
<%else%>
<! - #include file =" includes / jan.asp" - >
<%endif%>

现在我的目标是计算一年(任何一年)的哪一周。
即1月1日7日= w1.htm,1月8日至15日= w2.htm等,每周以
返回Wx.htm。
这样我所要做的就是保存一个wx.htm文件,其中x =一年中的一周。
所以...我怎样才能知道一年中的哪一周?
I have to update a page every week. I get the page ahead of time so I used
the "scheduled includes" webbot in Frontpage only to find that I would have to refresh the page every week to have it work. That is silly, it should run by itself. so...
I asked the question in the FP group and I was offered this pseudocode
to do it by month which would work if it''s possible to do it by week without writing 52 seperate lines, one for each week which would change each year
and have to be rewritten each year.

<% If Now()>date("1/3/2005") then %>
<!-- #include file="includes/mar.asp" -->
<% elseif Now()>date("1/2/2005") then %>
<!-- #include file="includes/feb.asp" -->
<% else %>
<!-- #include file="includes/jan.asp" -->
<% endif %>

Now the goal for me would be something that would calculate which week of
the year (any year) it is.
i.e. Jan 1-7 = w1.htm , Jan 8-15= w2.htm etc. and return a Wx.htm for each week.
That way all I have to do is save a wx.htm file where x= week of year.
so ... how can I caclulate what week of the year it is?



使用DatePart函数。这是在线文档:
http://www.msdn.microsoft.com/librar...ctdatepart.asp


"。:mmac:。 ; <丢失@海>在消息中写道

新闻:#J ************** @ TK2MSFTNGP09.phx.gbl ...
".:mmac:." <lost@sea> wrote in message
news:#J**************@TK2MSFTNGP09.phx.gbl...
我必须更新每周一页。我提前得到了页面,因此我使用了预定包含。 Frontpage中的webbot只是发现我每周必须刷新页面以使其工作。这很愚蠢,它本身应该是
。所以...
我在FP小组中提出了这个问题,并且我被提供了这个伪代码
按月进行,如果可以按周工作,那么这将是有效的。写了52个单独的行,每周一个,每年都会改变
并且必须每年重写。

<%If Now()> date(" 1/3) / 2005")然后%>
<! - #include file =" includes / mar.asp" - >
<%elseif现在()>日期(&#1/2/2005")然后%>
<! - #include file =" includes / feb的.asp" - >
<%else%>
<! - #include file =" includes / jan.asp" - >
<%endif%>

现在我的目标是计算一年(任何一年)的哪一周。
即1月1日7日= w1.htm,1月8日至15日= w2.htm等,每周以
返回Wx.htm。
这样我所要做的就是保存一个wx.htm文件,其中x =一年中的一周。
所以......我怎么能知道一年中的哪一周呢?
I have to update a page every week. I get the page ahead of time so I used
the "scheduled includes" webbot in Frontpage only to find that I would have to refresh the page every week to have it work. That is silly, it should run by itself. so...
I asked the question in the FP group and I was offered this pseudocode
to do it by month which would work if it''s possible to do it by week without writing 52 seperate lines, one for each week which would change each year
and have to be rewritten each year.

<% If Now()>date("1/3/2005") then %>
<!-- #include file="includes/mar.asp" -->
<% elseif Now()>date("1/2/2005") then %>
<!-- #include file="includes/feb.asp" -->
<% else %>
<!-- #include file="includes/jan.asp" -->
<% endif %>

Now the goal for me would be something that would calculate which week of
the year (any year) it is.
i.e. Jan 1-7 = w1.htm , Jan 8-15= w2.htm etc. and return a Wx.htm for each week.
That way all I have to do is save a wx.htm file where x= week of year.
so ... how can I caclulate what week of the year it is?



将1月1日 - 7日总是第1周?


第53周会不会只包含一两天?


Will January 1 - 7 always be Week 1?

Will Week 53 always consist of just one or two days?


是包括只生成静态HTML(如后面部分中暗示的那样

)?


如果是这样,请使用脚本来计算基于文件的名称在日期和使用

文件系统对象读取内容,然后写出来给客户端

(也许也可以使用server.execute)。如果包含的html是所有页面的

相同,那么您甚至可能希望将其缓存在应用程序

变量中,并且只在一周的第一天读取该文件。


-

Mark Schupp

开发主管

诚信电子学习
www.ielearning.com

"。:mmac:。 " <丢失@海>在消息中写道

新闻:%2 ****************** @ TK2MSFTNGP09.phx.gbl ...
Are the includes just generating static HTML (as is hinted in the later part
of the post)?

If so use script to compute the name of the file based on the date and use
the filesystem object to read the contents, then write it out to the client
(may be able to use server.execute as well). If the included html is the
same for all pages then you might even want to cache it in an application
variable and only read the file on the first day of the week.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
".:mmac:." <lost@sea> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
我必须每周更新一页。我提前得到了页面,因此我使用了预定包含。 Frontpage中的webbot只是发现我每周必须刷新页面以使其工作。这很愚蠢,它本身应该是
。所以...
我在FP小组中提出了这个问题,并且我被提供了这个伪代码
按月进行,如果可以按周工作,那么这将是有效的。写了52个单独的行,每周一个,每年都会改变
并且必须每年重写。

<%If Now()> date(" 1/3) / 2005")然后%>
<! - #include file =" includes / mar.asp" - >
<%elseif现在()>日期(&#1/2/2005")然后%>
<! - #include file =" includes / feb的.asp" - >
<%else%>
<! - #include file =" includes / jan.asp" - >
<%endif%>

现在我的目标是计算一年(任何一年)的哪一周。
即1月1日7日= w1.htm,1月8日至15日= w2.htm等,每周以
返回Wx.htm。
这样我所要做的就是保存一个wx.htm文件,其中x =一年中的一周。
所以......我怎样才能知道一年中的哪一周?
I have to update a page every week. I get the page ahead of time so I used
the "scheduled includes" webbot in Frontpage only to find that I would have to refresh the page every week to have it work. That is silly, it should run by itself. so...
I asked the question in the FP group and I was offered this pseudocode
to do it by month which would work if it''s possible to do it by week without writing 52 seperate lines, one for each week which would change each year
and have to be rewritten each year.

<% If Now()>date("1/3/2005") then %>
<!-- #include file="includes/mar.asp" -->
<% elseif Now()>date("1/2/2005") then %>
<!-- #include file="includes/feb.asp" -->
<% else %>
<!-- #include file="includes/jan.asp" -->
<% endif %>

Now the goal for me would be something that would calculate which week of
the year (any year) it is.
i.e. Jan 1-7 = w1.htm , Jan 8-15= w2.htm etc. and return a Wx.htm for each week.
That way all I have to do is save a wx.htm file where x= week of year.
so ... how can I caclulate what week of the year it is?



这篇关于包括基于一周中的一周的页面。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆