| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 547 人关注过本帖
标题:求助高手帮帮小弟。。。小弟万分感谢
只看楼主 加入收藏
ruiyi0610
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-11-27
收藏
 问题点数:0 回复次数:0 
求助高手帮帮小弟。。。小弟万分感谢
本人有一分类信息程序,有段代码出现错误了.自己整了几次都不行.添加的新闻已经到数据库里了,同时也在指定目录生成了静态页面,可以生成的页面里就是什么内内容都没有.急死我了.那位大侠帮我下.解决这个问题的话,我会吧这套程序送给他.,,,,

代码如下:



<!--#include file="conn_save.asp"-->
<%
dim dtitle,dcolor,dbgcolor1,dcu,dlei,dispic,dpic,dtext,dstop,dtop,dmoney,sql,rs
dtitle=HtmlEncode(trim(request.form("dtitle")))
dcolor=HtmlEncode(trim(request.form("dcolor")))
dbgcolor1=HtmlEncode(trim(request.form("dbgcolor1")))
dcu=HtmlEncode(trim(request.form("dcu")))
dcity=HtmlEncode(trim(request.form("dcity")))
dlei=HtmlEncode(trim(request.form("dlei")))
dispic=HtmlEncode(trim(request.form("dispic")))
dpic=HtmlEncode(trim(request.form("dpic")))
dtext=HtmlEncode2(request.form("dtext"))
dusername=HtmlEncode(trim(request.form("dusername1")))
dtel=HtmlEncode(trim(request.form("dtel1")))
dcardid=HtmlEncode(trim(request.form("dcardid1")))
dstop=dateadd("d",request.form("dstop"),date())
if dtitle="" or dcity="" or dlei="" or dtext="" then
response.write"<script>alert('请认真填写!');history.go(-1)</script>"
response.end
end if
dip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If dip = "" Then
dip = Request.ServerVariables("REMOTE_ADDR")
end if

sql="select * from china_data "
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if dtitle<>"" then
rs.addnew
rs("uid")=session("china_uid")
  '使用数组 返回值数组 = Split("字符串","分割符")<br />
  'IsArray()判断是否数组的函数,LBound()取数组的下标,UBound()取数组的上标。
   unhtmlgl=split(webguolv,"|")
   if IsArray(unhtmlgl) then
   for i=0 to UBound(unhtmlgl)
   dtitle=replace(dtitle,unhtmlgl(i),"***")
   next
   end if
rs("title")=dtitle
rs("color")=dcolor
rs("bgcolor1")=dbgcolor1
rs("cu")=dcu
rs("city")=dcity
rs("type")=dlei
rs("ispic")=dispic
if dpic="http://" then
dpic=""
end if
rs("pic")=dpic
  '使用数组 返回值数组 = Split("字符串","分割符")<br />
  'IsArray()判断是否数组的函数,LBound()取数组的下标,UBound()取数组的上标。
   unhtmlgl=split(webguolv,"|")
   if IsArray(unhtmlgl) then
   for i=0 to UBound(unhtmlgl)
   dtext=replace(dtext,unhtmlgl(i),"***")
   next
   end if
rs("text")=dtext
rs("username")=dusername
rs("tel")=dtel
rs("cardid")=dcardid
rs("stop")=dstop
rs("money")=0
if webinfo=1 then
rs("mark")="no" '审核后通过
else
rs("mark")="yes" '直接通过
end if
rs("ip")=dip
rs.update
if webinfo=1 then
response.write"<script>alert('您的信息已经提交成功,请等待等待管理员的审核。请牢记本条信息的ID号:"&rs("adid")&" 以便电话查询和修改信息');location='user.asp'</script>"
else
response.write"<script>alert('您的信息已经提交成功!');location='html/"&rs("adid")&".htm'</script>"
end if
id=rs("adid")
rs.close  
set rs=nothing  
conn.close   
set conn=nothing
''''''''''''''''''生成html开始''''''''''''''''''''''''''
ServerURL=CStr(Request.ServerVariables("SCRIPT_NAME"))
n=InStrRev(ServerURL,"/") '从右边第一个字符起查找"_"的位置,n为返回值
ServerURL=left(ServerURL, n)'显示从左边数第"n"个字符前面的字符,
ServerURL="http://"&Request.ServerVariables("SERVER_NAME")&""&ServerURL&"show.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/"&id&".htm"))
AA=replace(AA,"adpic/","../adpic/")
AA=replace(AA,"showrq.asp","../showrq.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,"login.asp","../login.asp")
AA=replace(AA,"114/join.asp","../114/join.asp")
AA=replace(AA,"114/qylogin.asp","../114/qylogin.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,"js_message.asp","../js_message.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  
''''''''''''''''''生成html结束''''''''''''''''''''''''''
end if%>
急求 小弟QQ  278455036
搜索更多相关主题的帖子: 感谢 
2008-11-27 14:25
快速回复:求助高手帮帮小弟。。。小弟万分感谢
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.037495 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved