找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 140|回复: 9

代码分析

[复制链接]
发表于 2010-1-11 05:45:29 | 显示全部楼层 |阅读模式 IP:江苏扬州
请教各位高手,以下代码为什么不能正确显示呢?
<%
Response.Buffer=true
On error resume next
If Request.ServerVariables("Request_Method")="GET" then
%>
主要问题出在:Response.Buffer=true
发表于 2010-1-11 05:45:33 | 显示全部楼层 IP:江苏扬州
<%
Response.Buffer=0 \' 设置输出缓存,用于显示不同页面。
On error resume next \' 忽略程序出错部分
If Request.ServerVariables("Request_Method")="GET" then
\' 判断客户是以什么方式请求 WEB 页面
回复

使用道具 举报

发表于 2010-1-11 05:45:36 | 显示全部楼层 IP:江苏扬州
版主能否把所有代码复制进行测试一下,帮我如何解决问题呢?
回复

使用道具 举报

发表于 2010-1-11 05:45:40 | 显示全部楼层 IP:江苏扬州
<%
Response.Buffer=true
'把这个设置为true的话buffer是缓冲的意思,设置为true的话服务器会一点一点的把处理结果发送到浏览器,而不是一次把所有处理结果发送到浏览器。
On error resume next
If Request.ServerVariables("Request_Method")="GET" then
%>
回复

使用道具 举报

发表于 2010-1-11 05:45:44 | 显示全部楼层 IP:江苏扬州
你的网页代码怎么写的?
回复

使用道具 举报

发表于 2010-1-11 05:45:48 | 显示全部楼层 IP:江苏扬州
为什么这样设置,在网页上不能正确显示呢?
回复

使用道具 举报

发表于 2010-1-11 05:45:52 | 显示全部楼层 IP:江苏扬州
仍然在:Response.Buffer=true 出现错误
回复

使用道具 举报

发表于 2010-1-11 05:45:56 | 显示全部楼层 IP:江苏扬州
首先感谢版主的关照!具体代码是这样:
<%@ Language=VBScript %>
<%
Response.Buffer=true \' 设置输出缓存,用于显示不同页面。
On error resume next \' 忽略程序出错部分
If Request.ServerVariables("Request_Method")="GET" then
\' 判断客户是以什么方式请求 WEB 页面
\'------------------------
\' 客户登陆界面
\'------------------------
%>
<form method="POST"action="chat.asp"><p>
<input type="text" name="nick" size="20" value="nick" style="background-color: rgb(192,192,192)"><br>
<input type="submit" value=" 进入聊天室 " name="B1" style="color: rgb(255,255,0); font-size: 9pt; background-color: rgb(0,128,128)">
</p>
<p><input type="hidden" name="log" size="20" value="1"><br></p>
</form>
<%
Response.End \' 结束程序的处理
Else
Response.clear \' 清空缓存中的内容
dim talk
If Request.Form("nick")<>"" then
\' 判断客户是是否在聊天界面中
Session("nick")=Request.Form("nick")
End If
\'------------------------\'
客户聊天界面
\'------------------------
%>
<form method="POST" action="chat.asp" name=form1><p>
<%=Session("nick")%>说话:<input type="text" name="talk" size="50">
<br>
<input type="submit" value=" 提交 " name="B1">
<input type="reset" value=" 取消 " name="B2"></p>
</form>
<A href="/asptest/shusheng/chat.asp">离开 </a><br><br>
<%
If Request.Form("log")<>1 then
If trim(Request.Form("talk"))="" then
\' 判断用户是否没有输入任何内容
talk=Session("nick")&" 沉默是金。"
Else
talk=trim(Request.Form("talk"))
\' 去掉字符后的空格
End If
Application.lock
Application("show")="< table border=\'0\' cellpadding=\'0\' cellspacing=\'0\' width=\'85%\' >< tr>< td width=\'100%\' bgcolor=\'#C0C0C0\'>< /td>< /tr>< tr>< td width=\'100%\'>< font color=\'#0000FF\'>来自 "&Request.ServerVariables("remote_addr")&" 的 "&Session("nick")&time&" 说:< /font>"&talk&"< /td>< /tr>< tr>< td width=\'100%\' bgcolor=\'#C0C0C0\'>< /td>< /tr>< /table>< br>"&Application("show")
Application.UnLock
Response.Write Application("show")
End If
End If
%>
请各位高手帮忙一下,看这段代码出错在哪里?
回复

使用道具 举报

发表于 2010-1-11 05:46:00 | 显示全部楼层 IP:江苏扬州
不行的话  换成
Response.Expires=0
回复

使用道具 举报

发表于 2010-1-11 05:46:04 | 显示全部楼层 IP:江苏扬州
On error resume next \' 忽略程序出错部分
把这句话临时删除掉看看出什么错误。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-30 01:29 , Processed in 0.220730 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表