使用 Request.ServerVariables 來列出與伺服器相關的資訊
- 伺服器網域名稱:Request.ServerVariables("SERVER_NAME") = mirlab.org
- 伺服器埠號:Request.ServerVariables("SERVER_PORT") = 80
- 伺服器協定:Request.ServerVariables("SERVER_PROTOCOL") = HTTP/1.1
- 網頁伺服器軟體名稱:Request.ServerVariables("SERVER_SOFTWARE") = Microsoft-IIS/10.0
- 伺服器加密:Request.ServerVariables("SERVER_PORT_SECURE") = 0
View source:
[Server-side script]
[Client-side script (ctrl+u)]
回到「JScript 程式設計與應用:伺服器端」