ssjs_getCGIVariable From JavaScript previous page next page JavaScript语言参考手册 技术交流 :迷途知返 pwwang.com JavaScript手册 ·目录 ·此参考中包含的内容 ·轻松上手 ·简介 ·操作符 ·语句 ·核心 ·文档 ·窗口 ·表单 ·浏览器 ·事件和事件句柄 ·LiveWire数据库服务 ·进程管理服务 ·实用工具 ·全局函数 ·LiveConnect的Java包 ·索引 ·版权 【目录】 【上一页】 【下一页】 【索引】 ssjs_getCGIVariable Returns the value of the specified environment variable set in the server process, including some CGI variables. 服务器端函数实现版本Netscape Server 3.0 语法 ssjs_getCGIVariable(varName) 参数 varNameA string containing the name of the environment variable to retrieve. 描述 ssjs_getCGIVariable lets you access the environment variables set in the server process, including the CGI variables listed in 表 13.2. 表 13.2 CGI variables accessible through ssjs_getCGIVariable Variable 描述 AUTH_TYPEThe authorization type, if the request is protected by any type of authorization. Netscape web servers support HTTP basic access authorization. Example value: basicHTTPSIf security is active on the server, the value of this variable is ON; otherwise, it is OFF. Example value: ONHTTPS_KEYSIZEThe number of bits in the session key used to encrypt the session, if security is on. Example value: 128HTTPS_SECRETKEYSIZEThe number of bits used to generate the server's private key. Example value: 128PATH_INFOPath information, as sent by the browser. Example value: /cgivars/cgivars.htmlPATH_TRANSLATEDThe actual system-specific pathname of the path contained in PATH_INFO. Example value: /usr/ns-home/myhttpd/js/samples/cgivars/cgivars.htmlQUERY_STRINGInformation from the requesting HTML page; if "?" is present, the information in the URL that comes after the "?". Example value: x=42REMOTE_ADDRThe IP address of the host that submitted the request. Example value: 198.93.95.47REMOTE_HOSTIf DNS is turned on for the server, the name of the host that submitted the request; otherwise, its IP address. Example value: www.netscape.comREMOTE_USERThe name of the local HTTP user of the web browser, if HTTP access authorization has been activated for this URL. Note that this is not a way to determine the user name of any person accessing your program. Example value: ksmithREQUEST_METHODThe HTTP 方法 associated with the request. An application can use this to determine the proper response to a request. Example value: GETSCRIPT_NAMEThe pathname to this page, as it appears in the URL. Example value: cgivars.htmlSERVER_NAMEThe hostname or IP address on which the JavaScript application is running, as it appears in the URL. Example value: piccolo.mcom.comSERVER_PORTThe TCP port on which the server is running. Example value: 2020SERVER_PROTOCOLThe HTTP protocol level supported by the client's software. Example value: HTTP/1.0SERVER_URLThe URL that the user typed to access this server. Example value: https://piccolo:2020 If you supply an argument that isn't one of the CGI variables listed in n, the runtime engine looks for an environment variable by that name in the server environment. If found, the runtime engine returns the value; otherwise, it returns null. For example, the following code assigns the value of the standard CLASSPATH environment variable to the JavaScript variable classpath: classpath = ssjs_getCGIVariable("CLASSPATH"); 【目录】 【上一页】 【下一页】 【索引】 返回页面顶部 previous page start next page