Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

system.getenv(3kaya) [debian man page]

System.getEnv(3kaya)					       Kaya module reference					      System.getEnv(3kaya)

NAME
System::getEnv - Get the value of an environment variable. SYNOPSIS
String getEnv( String env ) ARGUMENTS
env The name of the environment variable DESCRIPTION
Retrieves the value of an environment variable. This is often necessary in a web application as the web server will set environment variables in the program. Some of these headers are set by the server environment, others are set based on the current request (and so may be trivially forged by the user's browser). ua = getEnv("HTTP_USER_AGENT"); // Contents of User-Agent header host = getEnv("HTTP_HOST"); // the IP address of the web server user = getEnv("REMOTE_USER"); // the username under HTTP authentication ip = getEnv("REMOTE_ADDR"); // the client's IP address Environment variables are also useful for command-line programs home = getEnv("HOME"); // The user's home directory on Posix systems proxy = getEnv("HTTP_PROXY"); // The HTTP proxy to use for outgoing connections If the environment variable is not set, the empty String will be returned. AUTHORS
Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ LICENSE
The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation. RELATED
System.getArgs(3kaya) System.getPID(3kaya) Kaya October 2012 System.getEnv(3kaya)

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Environment variables in Perl

I don't use perl very often, and am stuck on how to create a perl variable from a literal and an environment variable; eg $FILE='/u/output'+env($UNIQUE_ID); Also how does the Apache web server create the UNIQUE_ID environment variable, and will an 8 character substring from 3 to 10 incl, in... (2 Replies)
Discussion started by: jgt
2 Replies

2. Web Development

Setting up Development and Live web site environment

Hi, I am fairly new to unix so please go easy on me.. I have a VPS on which I would like to setup a development and live web site environment and can't seem to work out what is the best technique for doing so. I would like to be able to mirror the live site and have a "check out" and... (0 Replies)
Discussion started by: ciantrius
0 Replies

Featured Tech Videos