| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 580 人关注过本帖
标题:错在哪里???
只看楼主 加入收藏
huangweia0
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2005-3-8
结帖率:33.33%
收藏
 问题点数:0 回复次数:4 
错在哪里???
以下程序<%                                                                           
response.write objasperror.category                                                     
if objasperror.aspcode>""then                                                  
response.write","&objasperror.aspcade                                       
response.write"(0x"& hex(objasperror.number)&")"&"<br>"                                 
response.write"<br>"&objasperror.description&"</b><br>"                     
if objasperror.aspdescription>""then                                            
response.write objasperror.aspdescription&"<br>"                                       
blnerrorwritten=false                                                        
'only show the source if it is available and the request is from the same machine as IIS
if objasperror.source>""then                                                   
strservername=lcase(request.serverVariables("server_name"))                             
strserverip=request.servervariables("LOCAL_ADDR")                                       
strremoteip=request.servervariables("remote_addr")                                      
if(strservername="localhost"or strserverip=strremoteip) and_                           
objasperror.file<>"?" then                                                              
response.write objasperror.file                                                         
if objasperror line>0 then                                                              
response.write",line"&objasperror.line                                       
if objasperror.column>0 then                                                            
response.write",column"&objasperror.column                                   
response.write"<br>"                                                         
response.write"<font style=""color:000000;font:8pt/11pt courier new""><b>"              
response.write server.htmlencode(objasperror.source)&"<br>"                             
if objasperror.column>0 rhen                                                            
response.write"</b></font>"                                                  
blnerrorwritten=true                                                         
end if                                                                        
end if                                                               
if not blnerrorwriteen and objasperror.file<>"?" then                                   
response.write"<b>"&objasperror.file                                 
if objasperror.line>0 then                                                              
response.write",line"&objasperror.line                        
if objasperror.column>0 then                                                            
response.write",column"&objasperror.clumn                           
response.write"</b><br>"                                             
end if                                                            
%〉

错误提示是最后一个end if 那里出了问题。
请教高手究竟错在哪里呢???
恳请不吝赐教!!!
2005-03-08 23:04
griefforyou
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:3336
专家分:0
注 册:2004-4-15
收藏
得分:0 
%〉 最后的大于号是全角的?

天津网站建设 http://www./
2005-03-09 08:56
junsh
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2005-2-25
收藏
得分:0 
if整个语句如果不是写在一行,在结束时必须要有endif和它匹配。
上述程序,你应该是从大的程序中抽取出来的吧。
改后如下,自己对照一下,看哪个地方不一样。(objasperror自己去定义)
<%                                                                           
response.write objasperror.category                                                     
if objasperror.aspcode>""then                                                  
response.write","&objasperror.aspcade                                       
response.write"(0x"& hex(objasperror.number)&")"&"<br>"                                 
response.write"<br>"&objasperror.description&"</b><br>"                     
if objasperror.aspdescription>""then                                            
response.write objasperror.aspdescription&"<br>"                                       
blnerrorwritten=false                                                        
'only show the source if it is available and the request is from the same machine as IIS
if objasperror.source>""then                                                   
strservername=lcase(request.serverVariables("server_name"))                             
strserverip=request.servervariables("LOCAL_ADDR")                                       
strremoteip=request.servervariables("remote_addr")                                      
if(strservername="localhost"or strserverip=strremoteip) and objasperror.file<>"?" then
response.write objasperror.file   
if objasperror.line>0 then                                                              
response.write",line"&objasperror.line                                       
if objasperror.column>0 then                                                            
response.write",column"&objasperror.column                                   
response.write"<br>"                                                         
response.write"<font style=""color:000000;font:8pt/11pt courier new""><b>"              
response.write server.htmlencode(objasperror.source)&"<br>"                             
if objasperror.column>0 then                                                            
response.write"</b></font>"                                                  
blnerrorwritten=true                                                         
end if               
end if
end if
end if
end if
end if
end if                                                            
if not blnerrorwriteen and objasperror.file<>"?" then                                   
response.write"<b>"&objasperror.file                                 
if objasperror.line>0 then                                                              
response.write",line"&objasperror.line                        
if objasperror.column>0 then                                                            
response.write",column"&objasperror.clumn                           
response.write"</b><br>"                                             
end if   
end if
end if                                                         
%>

天下无难事 只怕有心人 E-mail:junsh@ QQ:94582826
2005-03-09 09:29
huangweia0
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2005-3-8
收藏
得分:0 
可是第一句就有错误阿

Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft VBScript 运行时错误 错误 '800a01a8'

缺少对象: ''

/if.asp,行1


2005-03-09 14:50
huangweia0
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2005-3-8
收藏
得分:0 
是第二行Response.write obnasperror.category

2005-03-09 14:54
快速回复:错在哪里???
数据加载中...
 
   



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

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