phpbar.de logo

Mailinglisten-Archive

[php] Woher kommt UNIQUE_ID?

[php] Woher kommt UNIQUE_ID?

Kristian =?iso-8859-1?Q?K=F6hntopp?= kk_(at)_netuse.de
Tue, 31 Aug 1999 16:40:22 +0200


Ulrich Vogel wrote:
> > http://www.apache.org/docs/mod/mod_unique_id.html
> 
> ...und wie kann man dieses dann unter php abfragen? Wie sieht da
> der Syntax aus?

Handbuch-Man liest:
http://www.apache.org/docs/mod/mod_unique_id.html

Dort heißt es:
The environment variable UNIQUE_ID is set to the identifier for each request.


Handbuch-Man sucht weiter:
http://www.php.net/manual/html/variables.html

und liest:

Environment variables

PHP automatically makes environment variables available as normal PHP variables. 
echo $HOME;  /* Shows the HOME environment variable, if set. */

Since information coming in via GET, POST and Cookie mechanisms also automatically create PHP variables, it is sometimes best to explicitly read a variable from the environment in order to make sure that you are getting the right version. The getenv() function can be used for this. You can also set an environment variable with the putenv() function.

Der unglaubliche Handbuch-Man stürmt unaufhaltsam weiter zu:
http://www.php.net/manual/function.phpinfo.php3

und trifft dort

phpinfo -- Output lots of PHP information.

Description

int phpinfo(void);

Outputs a large amount of information about the current state of PHP. This includes
information about PHP compilation options and extensions, the PHP version, server
information and environment (if compiled as a module), the PHP environment, OS version
information, paths, master and local values of configuration options, HTTP headers, and the
GNU Public License. 


schließlich landet er bei
http://www.php.net/manual/function.getenv.php3


Returns the value of the environment variable varname, or false on an error. 

$ip = getenv("REMOTE_ADDR"); // get the ip number of the user 

------------------------------------------------------

Ein weiterer Artikel vom unbesiegbaren

------
\ H /   Handbuch-Man!
 \ /
  V


-- 
Kristian Köhntopp, NetUSE Kommunikationstechnologie GmbH
Siemenswall, D-24107 Kiel, Germany, +49 431 386 436 00
Using PHP3? See our web development library at
http://phplib.shonline.de/ (GPL)


php::bar PHP Wiki   -   Listenarchive