Getenv () function (environment variable) in PHP)

Source: Internet
Author: User
& Nbsp; getenv () in PHP gets the system environment variable (pre-defined variable) $ _ SERVER [SERVER_NAME] delphi. xcjc. net1F3X + r8P) u + I8I $ A; S3t5Q * j, B8X (m, x] $ GF % x8 | & S1p: f; a $ c-q $ spagergetenv (getenv () in s php gets the environment variable of the system (pre-defined variable)

$ _ SERVER ['server _ name']
Delphi. xcjc. net1 F3 X + r8 P) u + I8 I $ A; S3 t
5 Q * j, B8 X (m, x
'] $ G/F % x8 | & S1 p: f; a $ c-q
$ Spager = getenv ('server _ name'); delphi. xcjc. net7 R-N, u4 @: z2 F2 x. R: L
CJC Delphi skill Hall 5 Z! K "j5 m8 f0 g
"PHP_SELF" delphi.xcjc.net % u, @ 4 p-D-m4 L
The file name of the script being executed, which is related to document root. For example, using $ _ SERVER ['php _ SELF '] in a script with a URL address of http://example.com/test.php/foo.bar will get the result of/test. PHP/foo. bar. The _ FILE _ constant contains the absolute path and FILE name of the current (such as include) FILE.
Delphi Tip, Delphi Skills, Delphi tips % F-e6 C3 S % |. h
If PHP runs as a command line, this variable is invalid before PHP 4.3.0.

"Argv"
Parameters passed to the script. When the script runs in the command line mode, the argv variable is passed to the command line parameters in the C language style of the program. When the GET method is called, the variable contains the requested data. % A; T 'O + s' D2 Q6 v9 @ + G + N *{
*~ '} 1 R & Z1 A & w; L + ["n + g
"Argc" Delphi Tips, Delphi Skills, Delphi Skills, Delphi Q & A, Delphi technology, cjc delphi't) v # j] _ * n! D! B
Contains the number of command line parameters passed to the program (if it is in command line mode ).) P4 h "x % Q0 H2 \/n" N5 l)
'H.f # w) o % c * _ 8 \ 9 Y9 B
"GATEWAY_INTERFACE" Delphi Tip, Delphi Skills, Delphi tips +} 6 Y + Y3 e * c
The CGI specification version used by the server. For example, "CGI/1.1 ". CJC Delphi skill Hall. y + Y. g8 [, u |
, A1 W7 |, |! Q! |
"SERVER_NAME"
Name of the server host where the script is currently running. If the script runs on a VM, the name is determined by the value set by that VM. CJC Delphi skills Hall # I. A4 B9 z8 c

"SERVER_SOFTWARE"
The string identified by the server, which is provided in the header information in the response request.

"SERVER_PROTOCOL" delphi. xcjc. net9 \ "^ 7 W. K: \/] $ s5 _ $ _
The name and version of the communication protocol on the request page. For example, "HTTP/1.0 ". Delphi.xcjc.net B & [4 m % m * l
Delphi Tip, Delphi Skills, Delphi Skills + S, S; b1 S6 I7 q1 O-v/N '? & C
"REQUEST_METHOD"
The request method used to access the page. For example, "GET", "HEAD", "POST", and "PUT ".

Note: If the request method is HEAD, the PHP script will stop sending the header information (this means no output buffer is available after any output is generated ). Delphi Tips, Delphi Skills, Delphi Skills, Delphi Q & A, Delphi technology, cjc delphi/W5 [0 l! O4 [, y3 V5 A9 C
CJC Delphi technical Hall 9 Y: B-L & #~ & O
"REQUEST_TIME"

12 3 4 5 6 Next Page

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.