이 기사에서는 주로 웹 페이지의 ASP 강제 새로 고침을 소개하고 파일 주소 인스턴스 코드를 판단 할 수 있습니다
웹 페이지의 새로 고침
- <%
- '무작위 검증 코드의 필수 새로 고침
- 'IE의 뒤로 버튼을 누를 때마다 무작위 검증 코드를 자동으로 새로 고치게하십시오.
- 응답 .expires = -1
- 응답 .addheaderpragma, no-cache
- Response.AddHeaderCache-Control, 없음
- %>
파일 주소가 유효한지 확인하십시오
- <%
- response.write ()
- onerrorresumenext
- DimthisUrl, Thistext
- thisURL = request (thisURL) '파일 주소 (Non-HTML 형식 문서)를 정의합니다!
- if thisUrl = 그런 다음
- response.write (먼저 파일 주소를 입력하십시오!)
- 응답. 엔드
- endif
- functionobjxmlhttp (xmlurl)
- onerrorresumenext
- setobjxml = createobject (microsoft.xmlhttp)
- objxml.openget, xmlurl, false
- objxml.setRequestHeaderContent-Type, Application/x-www-form-urlencoded
- objxml.send
- objxmlhttp = objxml.responsebody
- iferrthen
- err.clear
- Response.Write (연결을 설정하지 못했고 파일이 존재하지 않거나 네트워크 문제가 있습니다!; 오류 이유 : & err.description &!)
- 응답. 엔드
- endif
- 최종 기능 장애
- functionbytes2bstr (vin)
- strreturn =
- fori = 1tolenb (vin)
- thischarCode = ASCB (MIDB (Vin, I, 1))
- ifthischarcode <& h80then
- strreturn = strreturn & chr (thischarcode)
- 또 다른
- NextCharCode = ASCB (MIDB (VIN, I+1,1))
- strreturn = strreturn & chr (clng (thischarcode)*& h100+cint (nextcharcode))
- i = i+1
- endif
- 다음
- 바이트 2bstr = strreturn
- 최종 기능 장애
- thisurl2 = split (thisurl ,,)
- foreachiiinthisurl2
- thistext = bytes2bstr (objxmlhttp (ii))
- ifinstr (thistext,) <> 0then
- 응답 (& ii & ×
- ))
- 또 다른
- 응답 (& ii & √
- ))
- endif
- 다음
- iferrthen
- err.clear
- Response.write (사고에 직면했습니다!; 오류 이유 : & err.description &!)
- 응답. 엔드
- endif
- %>
위는 웹 페이지의 강제로 새로 고침과 파일 주소를 판단하기위한 코드입니다.