搜虎精品社区
标题:
大家给看看。这两段代码
[打印本页]
作者:
love13834165706
时间:
2010-2-7 04:31
标题:
大家给看看。这两段代码
这是第一个:
''''''''''''''''''生成html开始''''''''''''''''''''''''''
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&"news.asp?id="&id
&""
Set Mail1 = Server.CreateObject("CDO.Message")
Mail1.CreateMHTMLBody ServerURL,31
AA=Mail1.HTMLBody
Set Mail1 = Nothing
set objfso = Server.CreateObject("Scripting.FileSystemObject")
set htmout = objfso.CreateTextFile(server.mappath("../html/news/"&id&".htm"))
AA=replace(AA,"css/style.css","/css/style.css")
AA=replace(AA,"post.asp","/post.asp")
AA=replace(AA,"shopping/","/shopping/")
AA=replace(AA,"runerrands.asp","/runerrands.asp")
AA=replace(AA,"people.asp","/people.asp")
AA=replace(AA,"8890news.asp","/8890news.asp")
AA=replace(AA,"Merchants.asp","/Merchants.asp")
AA=replace(AA,"life.asp","/life.asp")
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,"barlogin.asp","/barlogin.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,"comclass.asp","/comclass.asp")
AA=replace(AA,"info.asp","/info.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,"adpic/","/adpic/")
AA=replace(AA,"bbs/","/bbs/")
AA=replace(AA,"js/","/js/")
AA=replace(AA,"html/","")
AA=replace(AA,"ip.asp","/ip.asp")
AA=replace(AA,"fwxy.asp","/fwxy.asp")
AA=replace(AA,"flsm.asp","/flsm.asp")
AA=replace(AA,"mzsm.asp","/mzsm.asp")
AA=replace(AA,"ggfw.asp","/ggfw.asp")
AA=replace(AA,"contact.asp","/contact.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")
AA=replace(AA,"Weather/Weather.htm","/Weather/Weather.htm")
htmout.write replace(AA,"images/","/images/")
htmout.close
set htmout=nothing
set objfso=nothing
''''''''''''''''''生成html结束''''''''''''''''''''''''''
这是第二个
''''''''''''''''''生成html开始''''''''''''''''''''''''''
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&"joinshow.asp?id="&id
&""
Set Mail1 = Server.CreateObject("CDO.Message")
Mail1.CreateMHTMLBody ServerURL,31
AA=Mail1.HTMLBody
Set Mail1 = Nothing
set objfso = Server.CreateObject("Scripting.FileSystemObject")
set htmout = objfso.CreateTextFile(server.mappath("../html/join/"&id&".htm"))
AA=replace(AA,"css/style.css","/css/style.css")
AA=replace(AA,"joinpost.asp","/joinpost.asp")
AA=replace(AA,"shopping/","/shopping/")
AA=replace(AA,"runerrands.asp","/runerrands.asp")
AA=replace(AA,"people.asp","/people.asp")
AA=replace(AA,"8890news.asp","/8890news.asp")
AA=replace(AA,"Merchants.asp","/Merchants.asp")
AA=replace(AA,"life.asp","/life.asp")
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,"barlogin.asp","/barlogin.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,"comclass.asp","/comclass.asp")
AA=replace(AA,"joinshow.asp","/joinshow.asp")
AA=replace(AA,"114/qy/login.asp","/114/qylogin.asp")
AA=replace(AA,"join_message.asp","/join_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,"adpic/","/adpic/")
AA=replace(AA,"bbs/","/bbs/")
AA=replace(AA,"js/","/js/")
AA=replace(AA,"html/","")
AA=replace(AA,"ip.asp","/ip.asp")
AA=replace(AA,"fwxy.asp","/fwxy.asp")
AA=replace(AA,"flsm.asp","/flsm.asp")
AA=replace(AA,"mzsm.asp","/mzsm.asp")
AA=replace(AA,"ggfw.asp","/ggfw.asp")
AA=replace(AA,"contact.asp","/contact.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")
AA=replace(AA,"Weather/Weather.htm","/Weather/Weather.htm")
htmout.write replace(AA,"images/","/images/")
htmout.close
set htmout=nothing
set objfso=nothing
''''''''''''''''''生成html结束''''''''''''''''''''''''''
基本同样的代码,变成静态之后第一个就显示图片错误了。并且上传到空间之后全部没有样式
作者:
love13834165706
时间:
2010-2-7 04:32
大侠给看看啊。
上传到空间之后路径就错了。
作者:
aini123
时间:
2010-2-7 08:57
你样式表文件 最好放在 通用的地方 图片目录 最好放在根目录
作者:
ab61636452
时间:
2010-2-8 08:43
看不懂,你上传后,看看你显示错误的地址是什么,或许能得到原因
作者:
青春岁月
时间:
2010-2-16 16:00
你样式表文件 最好放在 通用的地方 图片目录 最好放在根目录
aini123 发表于 2010-2-7 08:57
路径问题....
作者:
86jslm
时间:
2010-2-16 16:20
好像是路径错了·
欢迎光临 搜虎精品社区 (https://souho.net/)
Powered by Discuz! X3.2