| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 661 人关注过本帖
标题:高手们进来帮我看看
只看楼主 加入收藏
wyjx
Rank: 1
等 级:新手上路
帖 子:21
专家分:0
注 册:2007-8-19
收藏
 问题点数:0 回复次数:4 
高手们进来帮我看看
下面是我一个提交页面提交后出显无法显示或一片空白、但信息是被写进数据库其它相关页面也有显示。
这是代码页、先在这里谢谢了、请各高手们帮忙……
<!--#include file="Conn.asp"-->
<!--#include file="setup.asp"-->
<!--#include file="inc/function.asp"-->
    <%if Request.Cookies("username")="" Then
        Response.Write"<script>alert(""请选登陆"");location.href=""User.asp"";</script>"
        Response.End
    End if
    Dim proof,GetCode
    proof=Strint(Request("proof"))
    GetCode=Strint(Session("GetCode"))
    Session("GetCode")=""
    If proof<>GetCode Or GetCode=0 Then
        Response.Write"<script>alert('验证码错误,请刷新后重填!');history.go(-1)</script>"
        Response.End()
    End If
    Dim dtitle,dcolor,dbgcolor1,dcu,dlei,dispic,dpic,dtext,dstop,dtop,dmoney,sql,Rs
    dtitle=HtmlEncode(Request.Form("dtitle"))
    dcolor=HtmlEncode(Request.Form("dcolor"))
    dcu=HtmlEncode(Request.Form("dcu"))
    city_oneid=strint(Request.Form("city_one"))
    city_twoid=strint(Request.Form("city_two"))
    city_threeid=strint(Request.Form("city_three"))
    type_oneid=strint(Request.Form("type_one"))
    type_twoid=strint(Request.Form("type_two"))
    type_threeid=strint(Request.Form("type_three"))
    dispic=HtmlEncode(Request.Form("dispic"))
    dpic=HtmlEncode(Request.Form("dpic"))
    IF dpic<>"" Then
        IF lcase(left(dpic,7))="http://" Or lcase(right(dpic,3))="asp" Or lcase(right(dpic,3))="htm" Then dpic=""
    End IF
    dtext=HtmlEncode2(Request.Form("dtext"))
    dusername=HtmlEncode(Request.Form("dusername1"))
    dtel=HtmlEncode(Request.Form("dtel1"))
    dcardid=HtmlEncode(Request.Form("dcardid1"))
    dstop=dateadd("d",Request.Form("dstop"),date())
    
    dblink
    city_one=Conn.Execute("select city from china_city where twoid=0 and id="&city_oneid)(0)
    If city_twoid>0 Then city_two=Conn.Execute("select city from china_city where id="&city_oneid&" and threeid=0 and twoid="&city_twoid)(0)
    If city_threeid<>0 Then city_three=Conn.Execute("select city from china_city where id="&city_oneid&" and twoid="&city_twoid&" and threeid="&city_threeid)(0)
    type_one=Conn.Execute("select name from china_type where twoid=0 and id="&type_oneid)(0)
    If type_twoid<>0 Then type_two=Conn.Execute("select name from china_type where id="&type_oneid&" and threeid=0 and twoid="&type_twoid)(0)
    If type_threeid<>0 Then type_three=Conn.Execute("select name from china_type where id="&type_oneid&" and twoid="&type_twoid&" and threeid="&type_threeid)(0)
    
    If dtitle="" Or city_oneid="" Or type_oneid="" Or dtext="" Then
        Conn.close:Set Conn=Nothing
        Response.Write"<script>alert('请认真填写!');history.go(-1)</script>"
        Response.End
    End If
    '使用数组 返回值数组 = 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
    unhtmlgl=split(webguolv,"|")
    If IsArray(unhtmlgl) Then
       for i=0 to UBound(unhtmlgl)
           dtext=replace(dtext,unhtmlgl(i),"***")
       next
    End If
    sql="select * from china_data"
    Set Rs=Server.createobject("adodb.recordset")
    Rs.open sql,Conn,1,3
    Rs.addnew
    Rs("uid")=Request.Cookies("username")
    Rs("title")=dtitle:    Rs("color")=dcolor:    Rs("cu")=dcu
    Rs("city_oneid")=city_oneid:Rs("city_one")=city_one:Rs("city_two")=city_two:Rs("city_twoid")=city_twoid:Rs("city_three")=city_three:Rs("city_threeid")=city_threeid
    Rs("type_oneid")=type_oneid:Rs("type_one")=type_one:Rs("type_twoid")=type_twoid:Rs("type_two")=type_two:Rs("type_threeid")=type_threeid:Rs("type_three")=type_three
    Rs("ispic")=dispic
    If lcase(left(dpic,7))="http://" Then dpic=""
    Rs("pic")=dpic: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")=getIP
    Rs.update
    id=Rs("adid")
    Rs.close:Set Rs=Nothing                                                                                    
    Conn.close:Set Conn=Nothing
    If webinfo="1" Then
        Response.Write"<script>alert('您的信息已经提交成功,请等待管理员的审核。请牢记本条信息的ID号:"&id&" 以便电话查询和修改信息');location='user.asp'</script>"
    Else
        ''''''''''''''''''生成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 http=Server.createobject("Ms" & "xml" & "2.XM" & "LHTTP")
        Http.open "get",ServerURL,false
        Http.send()
        Dim Temp,TempPath
        If Http.readystate=4 Then
            TempPath=Server.mappath("html/"&id&".htm")
            AA=Http.responseText
            Set objfso = Server.CreateObject("Scripting.FileSystemObject")
            Set htmout = objfso.CreateTextFile(TempPath)
            htmout.Write rep1(AA)
            htmout.close:Set htmout=Nothing
            
            IF objfso.FileExists(TempPath) Then
                IF objfso.Getfile(TempPath).Size>100 Then
                    Temp="html/"&id&".htm"
                End IF
            End IF
            Set objfso=Nothing
        End IF  
        Set http=Nothing
        IF Temp="" Then Temp="show.asp?id="&id
        ''''''''''''''''''生成html结束''''''''''''''''''''''''''
        Response.Write"<script>alert('恭喜您的信息已经发布成功!现在跳转到您发布的信息页面!');location='"&Temp&"'</script>"
    End If %>
搜索更多相关主题的帖子: 数据库 信息 Request include file 
2008-06-11 13:05
wyjx
Rank: 1
等 级:新手上路
帖 子:21
专家分:0
注 册:2007-8-19
收藏
得分:0 
怎么没有吗?
怎么没有吗?
怎么没有吗?
怎么没有吗?
2008-06-11 14:55
hmhz
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:30
帖 子:1890
专家分:503
注 册:2006-12-17
收藏
得分:0 
IF Temp="" Then
Temp="show.asp?id="&id
else
Response.Write"<script>alert('恭喜您的信息已经发布成功!现在跳转到您发布的信息页面!');location='"&Temp&"'</script>"
end if

[编程论坛] ASP超级群:49158383  敲门暗号:ASP编程
龍艺博客 http://www.
2008-06-11 15:27
wyjx
Rank: 1
等 级:新手上路
帖 子:21
专家分:0
注 册:2007-8-19
收藏
得分:0 
''''''''''''''''''生成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 http=Server.createobject("Ms" & "xml" & "2.XM" & "LHTTP")
        Http.open "get",ServerURL,false
        Http.send()
        Dim Temp,TempPath
        If Http.readystate=4 Then
            TempPath=Server.mappath("html/"&id&".htm")
            AA=Http.responseText
            Set objfso = Server.CreateObject("Scripting.FileSystemObject")
            Set htmout = objfso.CreateTextFile(TempPath)
            htmout.Write rep1(AA)
            htmout.close:Set htmout=Nothing
            
            IF objfso.FileExists(TempPath) Then
                IF objfso.Getfile(TempPath).Size>100 Then
                    Temp="html/"&id&".htm"
                End IF
            End IF
            Set objfso=Nothing
        End IF  
        Set http=Nothing
        IF Temp="" Then Temp="show.asp?id="&id
        ''''''''''''''''''生成html结束''''''''''''''''''''''''''
        Response.Write"<script>alert('恭喜您的信息已经发布成功!现在跳转到您发布的信息页面!');location='"&Temp&"'</script>"
    End If %>
好像就是这代码有问题我把自己审核关了就能正常?
刚才三楼的我也改了但还是不行、、、、、、
2008-06-11 15:47
zhangyao3287
Rank: 2
来 自:黑龙江省
等 级:论坛游民
威 望:2
帖 子:173
专家分:51
注 册:2008-5-25
收藏
得分:0 
responsebody?
2008-06-11 15:53
快速回复:高手们进来帮我看看
数据加载中...
 
   



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

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