asp(vb)獲取計算機名:
<%set oWSH = Server.CreateObject("WScript.Network")%>
<%=oWSH.ComputerName%>
判斷Cookie是否可用(禁止)
asp(vb):
<%Set objBC=Server.CreateObject("MSWC.BrowserType")%>
<%= objBC.Cookies%>
也可以在前一頁面中寫入cookie 在下一頁面調用,如調用不成功則說明Cookie不可用。
<%
response.cookies("CookieEnable2y")="yes"
response.cookies("CookieEnable2y").expires=date+30
%>
<%
Set objBC=Server.CreateObject("MSWC.BrowserType")
if request.cookies("CookieEnable2y")<>"yes" or (not objBC.Cookies) then
msg="錯誤,Cookie不可用,請正確設置瀏覽器!"
a=""
end if
%>
js:
<script language="javascript">
function check(){
if(window.navigator.cookieEnabled)
return true;
else{
alert("瀏覽器配置錯誤,Cookie不可用!");
return false;}
}
</script>
Request.ServerVariables("Url")
返回服務器地址
Request.ServerVariables("Path_Info")
客戶端提供的路徑信息
Request.ServerVariables("Appl_Physical_Path")
與應用程序元數據庫路徑相應的物理路徑
Request.ServerVariables("Path_Translated")
通過由虛擬至物理的映射后得到的路徑
Request.ServerVariables("Script_Name")
執行腳本的名稱
Request.ServerVariables("Query_String")
查詢字符串內容
Request.ServerVariables("Http_Referer")
上個頁面地址
Request.ServerVariables("Server_Port")
接受請求的服務器端口號
Request.ServerVariables("Remote_Addr")
發出請求的遠程主機的IP地址
Request.ServerVariables("Remote_Host")
發出請求的遠程主機名稱
Request.ServerVariables("Local_Addr")
返回接受請求的服務器地址
Request.ServerVariables("Http_Host")
返回服務器地址
Request.ServerVariables("Server_Name")
服務器的主機名、DNS地址或IP地址
Request.ServerVariables("Request_Method")
提出請求的方法比如GET、HEAD、POST等等
Request.ServerVariables("Server_Port_Secure")
如果接受請求的服務器端口為安全端口時,則為1,否則為0
Request.ServerVariables("Server_Protocol")
服務器使用的協議的名稱和版本
Request.ServerVariables("Server_Software")
應答請求并運行網關的服務器軟件的名稱和版本
Request.ServerVariables("All_Http")
客戶端發送的所有HTTP標頭,前綴HTTP_
Request.ServerVariables("All_Raw")
客戶端發送的所有HTTP標頭,其結果和客戶端發送時一樣,沒有前綴HTTP_
Request.ServerVariables("Appl_MD_Path")
應用程序的元數據庫路徑
Request.ServerVariables("Content_Length")
客戶端發出內容的長度
新聞熱點
疑難解答