BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / soft-design / #6064同步于 2006/4/14
SoftDesign机器人发帖

ASP检测错误辅助代码

lento
2006/4/14镜像同步0 回复
<!-- this sub will give you the exact position of each error if you include this file in your asp programme --------------------------------------------------------------------------------------------------------- -------------------------------------------geterror.asp-------------------------------------------------- --------------------------------------------------------------------------------------------------------- 这种纠错无法检测某些语法错误 --> <% sub geterror(position) if err.number=0 then exit sub %> <html> <body> <font color="red" size="+5">sorry, you've got an error!</font> <table cellpadding="5"> <tr> <td>Error<% = err.number %>:</td> <td><% =err.description %></td> </tr> <tr> <td>source:</td> <td><% = err.source %></td> </tr> <tr> <td>URL:</td> <td><% = request.ServerVariables("URL") %></td> </tr> <tr> <td>filename:</td> <td><% = request.ServerVariables("PATH_TRANSLATED") %></td> </tr> <tr> <td>location:</td> <td><% = position %></td> </tr> </table> </body> </html> <% response.end end sub %> 在你怀疑出错的文件里包含如上文件 然后在你怀疑出错的地方加上geterror函数 一般能找到具体位置和错误
订阅后,新回复会通过你的通知中心匿名送达。
0 条回复
暂无回复 · 你可以订阅本帖等待新回复。