大家给看看。这两段代码

[复制链接]
这是第一个:
''''''''''''''''''生成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结束''''''''''''''''''''''''''


基本同样的代码,变成静态之后第一个就显示图片错误了。并且上传到空间之后全部没有样式
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏
收藏0
本帖违规,我要举报
举报本帖
免责声明:
本站资源均来源于网络或是会员上传,版权和著作权归原作者所有,如有不愿意被转载,请点击这里通知我们第一时间删除!
所有资源仅供下载后在本地学习研究参考使用!您必须在下载资源后的24个小时之内,从您的电脑中彻底删除。
所有资源不能用于任何商业和非法目的,否则一切后果请用户自负。如您需要商用,请支持和购买正版,本站不对您的使用负任何责任!
会员所发布的信息中如有涉及到具体的第三方个人(单位/公司)隐私、商业秘密等,侵犯其权益,对其构成不良影响的,本站有权不做通知直接删除!

精彩评论5

跳转到指定楼层
#沙发
 楼主| love13834165706 发表于 2010-2-7 04:32:34 | 只看该作者
大侠给看看啊。
上传到空间之后路径就错了。
#板凳
aini123 发表于 2010-2-7 08:57:12 | 只看该作者
你样式表文件  最好放在  通用的地方    图片目录  最好放在根目录
#地板
ab61636452 发表于 2010-2-8 08:43:40 | 只看该作者
看不懂,你上传后,看看你显示错误的地址是什么,或许能得到原因
#地窖
青春岁月 发表于 2010-2-16 16:00:16 | 只看该作者
你样式表文件  最好放在  通用的地方    图片目录  最好放在根目录
aini123 发表于 2010-2-7 08:57


路径问题....
6#
86jslm 发表于 2010-2-16 16:20:02 | 只看该作者
好像是路径错了·
您需要登录后才可以回帖 登录 | 注册帐号

本版积分规则

发布主题
15年专注源码提供
侵权投诉处理

点击这里投诉侵权

周一至周日10:00-21:00

反馈建议/违规信息举报

webmaster@souho.net 在线客服咨询

扫描二维码关注我们

严禁任何人以任何形式在本站发表与我国法律相抵触的言论!本站资源仅供本地学习研究,禁止用于任何违法犯罪活动!

搜虎源码所有资源来自网络收集整理,版权和著作权归原作者所有,仅供本地研究学习。若有侵权,请联系管理员及时删除!

所有资源严禁用于任何商业目的,否则一切后果请用户自负。如您需要商用,请支持和购买正版,本站不对您的使用负任何责任!

如会员所发布的信息中有涉及到具体的第三方个人(单位/公司)隐私、商业秘密等,侵犯其权益,对其构成不良影响的,本站有权不做通知将该信息予以直接删除处理!

网站备案号: 鄂ICP备17009394号-2