Several common Chinese requests. servervariables

Source: Internet
Author: User
Tags servervariables

IP address of this file: <% = "http: //" & request. servervariables ("SERVER_NAME") & request. servervariables ("_ name") %>

Local IP address: <% = request. servervariables ("remote_addr") %>

Server Name: <% = request. servervariables ("SERVER_NAME") %>

Server IP: <% = request. servervariables ("local_addr") %>

Server port: <% = request. servervariables ("server_port") %>

Server time: <% = now %>

IIS Version: <% = request. servervariables ("server_software") %>

Script Timeout: <% = server. Timeout %>

Path of this file: <% = server. mappath (request. servervariables ("_ name") %>

Server CPU usage: <% = request. servervariables ("number_of_processors") %>

Server interpretation engine: <% = engine & "/" & enginemajorversion & "." & engineminorversion & "." & enginebuildversion %>

Server Operating System: <% = request. servervariables ("OS") %>

Supported file types: <% = request. servervariables ("http_accept") %>

Path of the accessed file: <% = request. servervariables ("http_url") %>

User Agent Information: <% = request. servervariables ("http_user_agent") %>

Get the file name in the URL and the passed value: request. servervariables ("_ name") + "? "+ Request. servervariables (" QUERY_STRING ")

Bytes -----------------------------------------------------------------------------------------------------

The result is as follows:

IP address of this file: http: // localhost/Ceshi. asp

Local IP Address: 127.0.0.1

Server Name: localhost

Server IP Address: 127.0.0.1

Server port 8091

Server time: 2005-7-27 14:28:04

Microsoft-IIS/5.0

Script Timeout: 90

Path: e:/hospital/Ceshi. asp

Server CPU count: 2

Server interpretation engine: Vb/5.6.7426

Server Operating System: windows_nt

Supported file types: image/GIF, image/X-xbitmap, image/JPEG, image/pjpeg, application/vnd. MS-PowerPoint, application/vnd. MS-Excel, application/MSWord, application/X-Shockwave-flash ,*/*

Path of the accessed file:/Ceshi. asp

User Agent Information: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; COM + 1.0.2204)

If you get the directory of this file, you can use the following functions:

<%

Public serverpath

Dim path

Dim POS

Path = "http: //" & request. servervariables ("SERVER_NAME") & request. servervariables ("_ name ")

Pos = Limit Rev (path ,"/")

Serverpath = left (path, POS)

End

%>

==================================

File directory: <% = serverpath %>

==================================

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.