当前位置:编程学习 > asp >>

更快更好地调试ASP程序代码?

答案:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
<title>程序调试高手</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<%@ LANGUAGE="VBScript" %>
<%
Response.Buffer = True
' 打开页面缓冲
On Error Resume Next
' 打开错误处理
%>
<%
 If Err.Number <> 0 Then
 ' 错误处理
 Response.Clear
   ' 清除缓冲区
  %>
</head>
<body>
<p><%= Err.Number %><br>
<%= Err.Line %><br>
</p>
</font><div align="center"><center>

<table border="0" cellspacing="0" width="600" height="166">
  <tr>
    <td height="61"><p align="center">精彩春风之ASP调试错误信息显示</td>
  </tr>
   <tr>
    <td height="106"><div align="center"><center><table border="1" cellspacing="0" width="400">
      <tr>
        <td colspan="2" width="400"><p align="center"><font
color="red">警告:本页面发生错误 </font></td>
      </tr>
      <tr>
        <td width="96">错误号</td>
        <td width="376"> </td>
      </tr>
      <tr>
        <td width="96">错误描述<%=
Err.Description %></td>
        <td width="376"> </td>
      </tr>
      <tr>
        <td width="96">错误源<%= Err.Source
%></td>
        <td width="376"> </td>
      </tr>
      <tr>
        <td width="96">错误发生行
</td>
        <td width="376"> </td>
      </tr>
    </table>
    </center></div></td>
  </tr>
</table>
</center></div>
</body>
</html>
<%
 End If
%>


 

上一个:如何获知IE和NC客户端的屏幕分辨率?
下一个:asp如何访问Excel表?

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,