PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Search
  • Equivalence
  • Environment variables in a WEBDEV site
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
SysEnvironment (Function)
In French: SysEnvironnement
Returns the environment variables of the operating system for the current computer.
Versions 15 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
New in version 15
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Note: To view and/or modify the environment variables of the current computer, open the control panel and click the "System" icon.
Example
// Find out the environment variables of the operating system
ResEnvironment = SysEnvironment()
Syntax
<Result> = SysEnvironment([<Environment Variable>])
<Result>: Character string
  • Full environment of current computer (or server) if no <Environment Variable> is specified. The environment lines are separated by CR characters.
  • Environment line whose first word corresponds to the <Environment Variable> parameter.
  • Empty string ("") if a problem occurred.
<Environment Variable>: Optional character string (with quotes)
Variable to find in the environment of the current computer ("PATH" or "USERNAME" for instance).
Remarks

Search

  • The search on the <Environment Variable> parameter is generic. For example, SysEnvironment("PR") returns the line corresponding to the prompt (if it exists in the environment).
  • If several lines match the search, only the first one is returned.

Equivalence

SysEnvironment returns the same result as the SET command of the DOS command line.
WEBDEV - Server code

Environment variables in a WEBDEV site

The environment variables returned correspond to the environment variables of the operating system of the server.
The CGI protocol defines a set of default variables:
Name of the variableContent
DOCUMENT_ROOTThe root directory for the documents of the Web server.
HTTP_COOKIEThe value of the cookies saved by the server.
Note: To handle the cookies, we recommend that you use CookieRead and CookieWrite.
HTTP_HOSTThe name of the server.
HTTP_REFERERThe URL of the page that directed to the current page.
HTTP_USER_AGENTThe description of the browser used.
HTTPSThis variable will have the value "on" if the HTTPS protocol was used. Otherwise, it is not defined.
QUERY_STRINGThe URL requested by the client machine before interpretation by the server. This is the "raw" request.
REMOTE_ADDRThe IP address of the browser. We recommend that you use BrowserIPAddress.
REMOTE_HOSTThe name of the client computer (or its IP address if the name could not be resolved or if the resolution feature is disabled in the Web server).
REMOTE_PORTThe port used by the client computer to connect to the Web server.
REMOTE_USERThe user name provided by the client computer (used for pages protected by a HTTP authentication mechanism).
REQUEST_METHODThe method used for running the HTTP request: "GET" or "POST".
REQUEST_URIThe URI requested by the client computer after interpretation by the server.
SCRIPT_FILENAMEThe full path of the program being run on the web server.
SCRIPT_NAMEThe portion of the SCRIPT_FILENAME variable relative to the DOCUMENT_ROOT variable.
SERVER_ADMINThe contact information of the server administrator (his email address in most cases).
SERVER_NAMEThe host header name of the server.
SERVER_PORTThe port on which the Web server has been contacted.
SERVER_SOFTWAREThe information string of the Web server (if it is provided).
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Linux wd230std.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment