在同一个操作下怎样生成多个静态页面?
filePath="../chem"fname=Pro_Xh&".html"pencat=rs2("E_Memo")pencat=replace(pencat,"H_Pr...
filePath = "../chem"
fname = Pro_Xh & ".html"
pencat=rs2("E_Memo")
pencat=replace(pencat,"H_Pro_xh",Pro_Xh)
pencat=replace(pencat,"H_proname",glhtml(Pro_Name))
pencat=replace(pencat,"H_Pro_dw",Pro_dw)
pencat=replace(pencat,"H_Pro_L",Pro_L)
pencat=replace(pencat,"H_Key_Eng",Key_Eng)
pencat=replace(pencat,"H_Key_Ch",Key_Ch)
pencat=replace(pencat,"H_description",Pro_Content)
pencat=replace(pencat,"H_Memo",content)
上面是生成页面的语句,我想在他下面执行下面的语句,中间的连接怎样做?
filePath = "../as"
fname = Pro_dw & ".html"
pencat=rs2("E_Memo")
pencat=replace(pencat,"H_Pro_xh",Pro_Xh)
pencat=replace(pencat,"H_proname",glhtml(Pro_Name))
pencat=replace(pencat,"H_description",Pro_Content)
pencat=replace(pencat,"H_Memo",content)
谢谢 展开
fname = Pro_Xh & ".html"
pencat=rs2("E_Memo")
pencat=replace(pencat,"H_Pro_xh",Pro_Xh)
pencat=replace(pencat,"H_proname",glhtml(Pro_Name))
pencat=replace(pencat,"H_Pro_dw",Pro_dw)
pencat=replace(pencat,"H_Pro_L",Pro_L)
pencat=replace(pencat,"H_Key_Eng",Key_Eng)
pencat=replace(pencat,"H_Key_Ch",Key_Ch)
pencat=replace(pencat,"H_description",Pro_Content)
pencat=replace(pencat,"H_Memo",content)
上面是生成页面的语句,我想在他下面执行下面的语句,中间的连接怎样做?
filePath = "../as"
fname = Pro_dw & ".html"
pencat=rs2("E_Memo")
pencat=replace(pencat,"H_Pro_xh",Pro_Xh)
pencat=replace(pencat,"H_proname",glhtml(Pro_Name))
pencat=replace(pencat,"H_description",Pro_Content)
pencat=replace(pencat,"H_Memo",content)
谢谢 展开
1个回答
展开全部
这是我做的网站生成静态页面的那个页面,你看看参考一下
<!--#include file="conn.asp"-->
<%
if session("china_admin")="" then
response.redirect "login.asp"
response.end
end if
type1=request("type")
if type1<>"show" and type1<>"news" then
response.write "<script>alert('参数错误码,立即返回!');history.back();</script>"
response.end
end if
Server.ScriptTimeOut=30000
set rs=server.createobject("adodb.recordset")
if type1="show" then
rs.open "china_data",conn,1,1
end if
if type1="news" then
rs.open "news_data",conn,1,1
end if
if rs.bof and rs.eof then
response.write "<script>alert('没有任何信息,立即返回!');history.back();</script>"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
else
ServerURL=CStr(Request.ServerVariables("SCRIPT_NAME"))
n=InStrRev(ServerURL,"/") '从右边第一个字符起查找"_"的位置,n为返回值
ServerURL=left(ServerURL, n-1)'显示从左边数第"n-1"个字符前面的字符,
n=InStrRev(ServerURL,"/") '从右边第一个字符起查找"_"的位置,n为返回值
ServerURL=left(ServerURL, n)'显示从左边数第"n"个字符前面的字符,
ServerURL="http://"&Request.ServerVariables("SERVER_NAME")&ServerURL
''''''''''''''''''生成html开始''''''''''''''''''''''''''
if type1="show" then
do while not rs.eof
ServerURL1=ServerURL&"show.asp?id="&rs("adid")
set http=server.createobject("MSXML2.XMLHTTP")
Http.open "post",ServerURL1,false
Http.send()
AA=Http.responseText
set http=nothing
set objfso = Server.CreateObject("Scripting.FileSystemObject")
set htmout = objfso.CreateTextFile(server.mappath("../html/"&rs("adid")&".htm"))
AA=replace(AA,"adpic/","../adpic/")
AA=replace(AA,"link.asp","../link.asp")
AA=replace(AA,"link_img.asp","../link_img.asp")
AA=replace(AA,"index.asp","../index.asp")
AA=replace(AA,"114/../index.asp","../114/index.asp")
AA=replace(AA,"ad.asp","../ad.asp")
AA=replace(AA,"TV.asp","../tv.asp")
AA=replace(AA,"user.asp","../user.asp")
AA=replace(AA,"gbook.asp","../gbook.asp")
AA=replace(AA,"city.asp","../city.asp")
AA=replace(AA,"post.asp","../post.asp")
AA=replace(AA,"city_more.asp","../city_more.asp")
AA=replace(AA,"reg.asp","../reg.asp")
AA=replace(AA,"login.asp","../login.asp")
AA=replace(AA,"search.asp","../search.asp")
AA=replace(AA,"114/join.asp","../114/join.asp")
AA=replace(AA,"fabu.asp","../fabu.asp")
AA=replace(AA,"type.asp","../type.asp")
AA=replace(AA,"show.asp","../show.asp")
AA=replace(AA,"114/qy../login.asp","../114/qylogin.asp")
AA=replace(AA,"rq_message.asp","../rq_message.asp")
AA=replace(AA,"top.asp","../top.asp")
AA=replace(AA,"money.asp","../money.asp")
AA=replace(AA,"pic.asp","../pic.asp")
AA=replace(AA,"bbs/","../bbs/")
AA=replace(AA,"html/","")
AA=replace(AA,"ip.asp","../ip.asp")
AA=replace(AA,"phone.asp","../phone.asp")
AA=replace(AA,"about.asp","../about.asp")
AA=replace(AA,"send_zn_message.asp","../send_zn_message.asp")
htmout.write replace(AA,"images/","../images/")
htmout.close
set htmout=nothing
set objfso=nothing
rs.movenext
loop
end if
''''''''''''''''''生成html结束''''''''''''''''''''''''''
''''''''''''''''''生成新闻开始''''''''''''''''''''''''''
if type1="news" then
do while not rs.eof
ServerURL1=ServerURL&"news.asp?id="&rs("adid")
set objfso = Server.CreateObject("Scripting.FileSystemObject")
set http=server.createobject("MSXML2.XMLHTTP")
Http.open "post",ServerURL1,false
Http.send()
AA=Http.responseText
set htmout = objfso.CreateTextFile(server.mappath("../html/news/"&rs("adid")&".htm"))
AA=replace(AA,"post.asp","../../post.asp")
AA=replace(AA,"adpic/","../../adpic/")
AA=replace(AA,"link.asp","../../link.asp")
AA=replace(AA,"link_img.asp","../../link_img.asp")
AA=replace(AA,"index.asp","../../index.asp")
AA=replace(AA,"114/../../index.asp","../../114/index.asp")
AA=replace(AA,"ad.asp","../../ad.asp")
AA=replace(AA,"TV.asp","../../tv.asp")
AA=replace(AA,"user.asp","../../user.asp")
AA=replace(AA,"gbook.asp","../../gbook.asp")
AA=replace(AA,"city.asp","../../city.asp")
AA=replace(AA,"city_more.asp","../../city_more.asp")
AA=replace(AA,"reg.asp","../../reg.asp")
AA=replace(AA,"login.asp","../../login.asp")
AA=replace(AA,"search.asp","../../search.asp")
AA=replace(AA,"114/join.asp","../../114/join.asp")
AA=replace(AA,"114/qy../../login.asp","../../114/qylogin.asp")
AA=replace(AA,"fabu.asp","../../fabu.asp")
AA=replace(AA,"type.asp","../../type.asp")
AA=replace(AA,"rq_message.asp","../../rq_message.asp")
AA=replace(AA,"top.asp","../../top.asp")
AA=replace(AA,"money.asp","../../money.asp")
AA=replace(AA,"pic.asp","../../pic.asp")
AA=replace(AA,"bbs/","../../bbs/")
AA=replace(AA,"html/news/","")
AA=replace(AA,"about.asp","../../about.asp")
htmout.write replace(AA,"images/","../../images/")
htmout.close
set htmout=nothing
set objfso=nothing
rs.movenext
loop
end if
''''''''''''''''''生成新闻结束''''''''''''''''''''''''''
rs.close
set rs=nothing
conn.close
set conn=nothing
Server.ScriptTimeOut=60
response.write "<script>alert('生成成功,立即返回!');history.back();</script>"
end if
%>
<!--#include file="conn.asp"-->
<%
if session("china_admin")="" then
response.redirect "login.asp"
response.end
end if
type1=request("type")
if type1<>"show" and type1<>"news" then
response.write "<script>alert('参数错误码,立即返回!');history.back();</script>"
response.end
end if
Server.ScriptTimeOut=30000
set rs=server.createobject("adodb.recordset")
if type1="show" then
rs.open "china_data",conn,1,1
end if
if type1="news" then
rs.open "news_data",conn,1,1
end if
if rs.bof and rs.eof then
response.write "<script>alert('没有任何信息,立即返回!');history.back();</script>"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
else
ServerURL=CStr(Request.ServerVariables("SCRIPT_NAME"))
n=InStrRev(ServerURL,"/") '从右边第一个字符起查找"_"的位置,n为返回值
ServerURL=left(ServerURL, n-1)'显示从左边数第"n-1"个字符前面的字符,
n=InStrRev(ServerURL,"/") '从右边第一个字符起查找"_"的位置,n为返回值
ServerURL=left(ServerURL, n)'显示从左边数第"n"个字符前面的字符,
ServerURL="http://"&Request.ServerVariables("SERVER_NAME")&ServerURL
''''''''''''''''''生成html开始''''''''''''''''''''''''''
if type1="show" then
do while not rs.eof
ServerURL1=ServerURL&"show.asp?id="&rs("adid")
set http=server.createobject("MSXML2.XMLHTTP")
Http.open "post",ServerURL1,false
Http.send()
AA=Http.responseText
set http=nothing
set objfso = Server.CreateObject("Scripting.FileSystemObject")
set htmout = objfso.CreateTextFile(server.mappath("../html/"&rs("adid")&".htm"))
AA=replace(AA,"adpic/","../adpic/")
AA=replace(AA,"link.asp","../link.asp")
AA=replace(AA,"link_img.asp","../link_img.asp")
AA=replace(AA,"index.asp","../index.asp")
AA=replace(AA,"114/../index.asp","../114/index.asp")
AA=replace(AA,"ad.asp","../ad.asp")
AA=replace(AA,"TV.asp","../tv.asp")
AA=replace(AA,"user.asp","../user.asp")
AA=replace(AA,"gbook.asp","../gbook.asp")
AA=replace(AA,"city.asp","../city.asp")
AA=replace(AA,"post.asp","../post.asp")
AA=replace(AA,"city_more.asp","../city_more.asp")
AA=replace(AA,"reg.asp","../reg.asp")
AA=replace(AA,"login.asp","../login.asp")
AA=replace(AA,"search.asp","../search.asp")
AA=replace(AA,"114/join.asp","../114/join.asp")
AA=replace(AA,"fabu.asp","../fabu.asp")
AA=replace(AA,"type.asp","../type.asp")
AA=replace(AA,"show.asp","../show.asp")
AA=replace(AA,"114/qy../login.asp","../114/qylogin.asp")
AA=replace(AA,"rq_message.asp","../rq_message.asp")
AA=replace(AA,"top.asp","../top.asp")
AA=replace(AA,"money.asp","../money.asp")
AA=replace(AA,"pic.asp","../pic.asp")
AA=replace(AA,"bbs/","../bbs/")
AA=replace(AA,"html/","")
AA=replace(AA,"ip.asp","../ip.asp")
AA=replace(AA,"phone.asp","../phone.asp")
AA=replace(AA,"about.asp","../about.asp")
AA=replace(AA,"send_zn_message.asp","../send_zn_message.asp")
htmout.write replace(AA,"images/","../images/")
htmout.close
set htmout=nothing
set objfso=nothing
rs.movenext
loop
end if
''''''''''''''''''生成html结束''''''''''''''''''''''''''
''''''''''''''''''生成新闻开始''''''''''''''''''''''''''
if type1="news" then
do while not rs.eof
ServerURL1=ServerURL&"news.asp?id="&rs("adid")
set objfso = Server.CreateObject("Scripting.FileSystemObject")
set http=server.createobject("MSXML2.XMLHTTP")
Http.open "post",ServerURL1,false
Http.send()
AA=Http.responseText
set htmout = objfso.CreateTextFile(server.mappath("../html/news/"&rs("adid")&".htm"))
AA=replace(AA,"post.asp","../../post.asp")
AA=replace(AA,"adpic/","../../adpic/")
AA=replace(AA,"link.asp","../../link.asp")
AA=replace(AA,"link_img.asp","../../link_img.asp")
AA=replace(AA,"index.asp","../../index.asp")
AA=replace(AA,"114/../../index.asp","../../114/index.asp")
AA=replace(AA,"ad.asp","../../ad.asp")
AA=replace(AA,"TV.asp","../../tv.asp")
AA=replace(AA,"user.asp","../../user.asp")
AA=replace(AA,"gbook.asp","../../gbook.asp")
AA=replace(AA,"city.asp","../../city.asp")
AA=replace(AA,"city_more.asp","../../city_more.asp")
AA=replace(AA,"reg.asp","../../reg.asp")
AA=replace(AA,"login.asp","../../login.asp")
AA=replace(AA,"search.asp","../../search.asp")
AA=replace(AA,"114/join.asp","../../114/join.asp")
AA=replace(AA,"114/qy../../login.asp","../../114/qylogin.asp")
AA=replace(AA,"fabu.asp","../../fabu.asp")
AA=replace(AA,"type.asp","../../type.asp")
AA=replace(AA,"rq_message.asp","../../rq_message.asp")
AA=replace(AA,"top.asp","../../top.asp")
AA=replace(AA,"money.asp","../../money.asp")
AA=replace(AA,"pic.asp","../../pic.asp")
AA=replace(AA,"bbs/","../../bbs/")
AA=replace(AA,"html/news/","")
AA=replace(AA,"about.asp","../../about.asp")
htmout.write replace(AA,"images/","../../images/")
htmout.close
set htmout=nothing
set objfso=nothing
rs.movenext
loop
end if
''''''''''''''''''生成新闻结束''''''''''''''''''''''''''
rs.close
set rs=nothing
conn.close
set conn=nothing
Server.ScriptTimeOut=60
response.write "<script>alert('生成成功,立即返回!');history.back();</script>"
end if
%>
Storm代理
2023-08-29 广告
2023-08-29 广告
"StormProxies是全球大数据IP资源服务商,其住宅代理网络由真实的家庭住宅IP组成,可为企业或个人提供满足各种场景的代理产品。点击免费测试(注册即送1G流量)StormProxies有哪些优势?1、IP+端口提取形式,不限带宽,I...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询