ASP應(yīng)用進(jìn)階 ASP Error對(duì)象的相關(guān)知識(shí)(5)_ASP教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
推薦:實(shí)例詳解ASP中斷開記錄集的使用方法我們?cè)谑褂肁SP 內(nèi)置的ADO組件進(jìn)行數(shù)據(jù)庫(kù)編程時(shí),通常是在腳本的開頭打開一個(gè)連接,并在腳本的最后關(guān)閉它,但是就較大腳本而言,在多數(shù)情況下連接打開的時(shí)間要比它需要打開的時(shí)間長(zhǎng)得多。因此為
這個(gè)操作起來確實(shí)很煩,看看老蓋先生的在500-100.asp里面寫了寫什么東西:
| <% Response.WriteobjASPError.Category IfobjASPError.ASPCode>""ThenResponse.Write","&objASPError.ASPCode Response.Write"(0x"&Hex(objASPError.Number)&")"&"<br>" Response.Write"<b>"&objASPError.Description&"</b><br>" IfobjASPError.ASPDescription>""ThenResponse.WriteobjASPError.ASPDescription&"<br>" blnErrorWritten=False 'OnlyshowtheSourceifitisavailableandtherequestisfromthesamemachineasIIS IfobjASPError.Source>""Then strServername=LCase(Request.ServerVariables("SERVER_NAME")) strServerIP=Request.ServerVariables("LOCAL_ADDR") strRemoteIP= Request.ServerVariables("REMOTE_ADDR") If(strServername="localhost"OrstrServerIP=strRemoteIP)AndobjASPError.File<>"?"Then Response.WriteobjASPError.File IfobjASPError.Line>0ThenResponse.Write",line"&objASPError.Line IfobjASPError.Column>0ThenResponse.Write",column"&objASPError.Column Response.Write"<br>" Response.Write"<fontstyle=""COLOR:000000;FONT:8pt/11ptcouriernew""><b>" Response.WriteServer.HTMLEncode(objASPError.Source)&"<br>" IfobjASPError.Column>0ThenResponse.WriteString((objASPError.Column-1),"-")&"^<br>" Response.Write"</b></font>" blnErrorWritten=True EndIf EndIf IfNotblnErrorWrittenAndobjASPError.File<>"?"Then Response.Write"<b>"&objASPError.File IfobjASPError.Line>0ThenResponse.Write",line"&objASPError.Line IfobjASPError.Column>0ThenResponse.Write",column"&objASPError.Column Response.Write"</b><br>" EndIf %> |
分享:請(qǐng)注意!常見的ASP腳本攻擊及防范技巧由于ASP的方便易用,越來越多的網(wǎng)站后臺(tái)程序都使用ASP腳本語(yǔ)言。但是, 由于ASP本身存在一些安全漏洞,稍不小心就會(huì)給黑客提供可乘之機(jī)。事實(shí)上,安全不僅是網(wǎng)管的事,編程人員也必須在某些安全
相關(guān)ASP教程:
- asp FSO 讀寫文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫(kù)實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁(yè)模板:ASP內(nèi)建對(duì)象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無組件分頁(yè)實(shí)現(xiàn)思路及代碼
- 相關(guān)鏈接:
復(fù)制本頁(yè)鏈接| 搜索ASP應(yīng)用進(jìn)階 ASP Error對(duì)象的相關(guān)知識(shí)(5)
- 教程說明:
ASP教程-ASP應(yīng)用進(jìn)階 ASP Error對(duì)象的相關(guān)知識(shí)(5)
。