asp怎么查看错误啊

来源:百度知道 编辑:UC知道 时间:2024/06/26 01:01:31
有没有一种软件能用编C语言一样能看到他第几行怎么出错的啊,我经常错误就是http 500内部找不到之类的郁闷,自己又找不到哪里错!另外这个例子哪里错了,书上的
<html>
<head>
<title>untitled document</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
</head>

<body>
<%
function examresult(sname,igrade)
if igrade >=60 then
'将返回值赋给函数变量
examresult = sname& "考试合格!<br>"
else
examresult = sname& "考试不合格!<br>"
end if
end function

sub examresultsub(sname,igrade)
if igrade>=60 then
response.write sname& "考试合格!<br>"
else
response.write sname& "考试不合格!<br>"
end if
end sub

response.write examresult("黎明",80)
call examresultsub("望林",54)
examresultsub "张仪",90
response.write examresult("赵男",72)
%>
</body>
</

解决方案,在服务器端(IIS)设置为向客户端发送错误信息,在客户端(IE)设置显示错误信息,IIS和IE设置如下:

1、IIS:在你的站点上右击选“属性”-“主目录”-“配置”-“调试”,选择“向客户端发送详细的ASP错误信息”后点确定。

2、IE:“工具”-“Internet选项”-“高级”,在“设置”区域里把“显示友好http错误信息”的勾去掉,应用、确定即可。

注:IIS一般默认情况下是向客户端发送错误信息的。

你的

<%language="vbscript" codepage="936"%>
写错了

是这样的

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

ie浏览器自己就解释了 给你指出了错误!

是你自己本地的WEB服务没设置好