<script>
function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm
//For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
DocURL=document.URL;
//this is where the http or https will be, as found by searching for :// but skipping the res://
protocolIndex=DocURL.indexOf("://",4);
//this finds the ending slash for the domain server
serverIndex=DocURL.indexOf("/",protocolIndex + 3);
//for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
//of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
BeginURL=DocURL.indexOf("#",1) + 1;
urlresult=DocURL.substring(BeginURL,serverIndex);
//for display, we need to skip after http://, and go to the next slash
displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
document.write('<A HREF="' + urlresult + '">' + displayresult + "</a>");
}
//-->
</script>
If objASPError.ASPDescription > "" Then Response.Write Server.HTMLEncode(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 Server.HTMLEncode(objASPError.File)
If objASPError.Line > 0 Then Response.Write ", 第 " & objASPError.Line & " 行"
If objASPError.Column > 0 Then Response.Write ", 第 " & objASPError.Column & " 列"
Response.Write "<br>"
Response.Write "<font style=""COLOR:000000; FONT: 9pt 宋体""><b>"
Response.Write Server.HTMLEncode(objASPError.Source) & "<br>"
If objASPError.Column > 0 Then Response.Write String((objASPError.Column - 1), "-") & "^<br>"
Response.Write "</b></font>"
blnErrorWritten = True
End If
End If
If Not blnErrorWritten And objASPError.File <> "?" Then
Response.Write "<b>"
Response.Write Server.HTMLEncode(objASPError.File)
If objASPError.Line > 0 Then Response.Write Server.HTMLEncode(", 第 " & objASPError.Line & " 行")
If objASPError.Column > 0 Then Response.Write ", 第 " & objASPError.Column & " 列"
'-------------------------------------------------------------------
' added by Bigeagle
' date: 2000/5/10
dim l_strAspDescription
l_strAspDescription = "错误原因:" + objASPError.Description()
if l_strAspDescription <> "" then
response.write("<p>" + l_strAspDescription+ "</p>")
end if
l_strAspDescription = "详细描述:" + objASPError.ASPDescription()
if l_strAspDescription <> "" then
response.write("<p>" + l_strAspDescription+ "</p>")
end if
'-------------------------------------------------------------------
Response.Write "</b><br>"
End If
%>
</li>
<p>
<li>浏览器类型:<br>
<%= Request.ServerVariables("HTTP_USER_AGENT") %>
</li>
<p>
<li>页:<br>
<%
strMethod = Request.ServerVariables("REQUEST_METHOD")
Response.Write strMethod & " "
If strMethod = "POST" Then
Response.Write Request.TotalBytes & " bytes to "
End If
If lngPos > 1 Then
Response.Write "?" & Left(Request.QueryString, (lngPos - 1))
End If
Response.Write "</li>"
If strMethod = "POST" Then
Response.Write "<p><li>POST 数据:<br>"
If Request.TotalBytes > lngMaxFormBytes Then
Response.Write Server.HTMLEncode(Left(Request.Form, lngMaxFormBytes)) & " . . ."
Else
Response.Write Server.HTMLEncode(Request.Form)
End If
Response.Write "</li>"
End If