Today, I carefully studied the manual about server variables and wrote a note to help beginners. I think the red part is more common and important. the blue part is added after debugging, which is easy to understand. Repost, please respect the
$ _ SERVER environment variable usage in php. This article introduces the usage of various parameters of $ _ SERVER environment variables. For more information, see this article. $ _ SERVER [PHP_SELF]: relative to the path of the website root
Sometimes,
$_ENV
Is empty, the reason for this is usually the configuration file for PHP php.ini:
variables_order = "GPCS"
. want to let
$_ENV
value is not NULL, then the value of Variables_order should be prefixed with an uppercase letter "E", i.e.:
Getenv getting the environment variables of the system
Syntax: String getenv (String varname),-----------parameter varname should be a predetermined element index name in $_server (server Super global variable array), or putenv ("New=very new")
Instinctively installed is the win7aparche + php + wps environment. you can use PHP to call the com component to read the word and transfer it to win2008iis + PHP + wps on the server. the following error occurs: PHPFatalerror: uncaughtexception & #03
PHP obtains the path, name, and server path of the file running before the current period. & lt ;? Phpecho "shows the relative path and file name of the script file :\"". $ _ SERVER ["PHP_SELF"]. "\" & lt; br & gt; "; echo" display the CGI script
About PHP Server variables $_server usage, server variables $_server detailed, are commonly used in some $_server variables, interested friends under reference.
server variable $_server detailed: 1, $_session[' php_self ')--Gets the name
Php development is urgent and urgent ...... Online .... Tips: use eclipse and tomcat to open php, so you don't need myeclipse. The new user asks for environment configuration and the software and plug-ins to be installed. ------ Solution ------------
Instinctively installed is the Win7 Aparche +php +wps environment, you can use PHP to call COM components to read Word, transfer to the server win2008 iis+php+wps problem, wrong tip: PHP Fatal error:uncaught exce Ption ' com_exception ' with the
$_server is an array of information, such as header information (header), path, and script location (scripts locations), and so on. The items in this array are created by the WEB server. There is no guarantee that each server will provide all the
Server variable $_server Detailed:
1, $_session[' php_self ')--Gets the file name of the currently executing script
2, $_server[' Server_protocol ')--the name and version of the communication protocol when the page is requested. For example, "http/1
In PHP, the getenv (parameter) function is a function to get environment variables, depending on the parameters available to obtain different environment variables, as follows:
"Php_self"The file name of the currently executing script, which is
Php-5.2.17 without VC9 version, how can I install php on iis? Php-5.2.17 no VC9 version, how can I install php on iis ?, 1, install PHP5 & nbsp; download: http://cn2.php.net/get/php-5.2.0-Win32.zip/f php-5.2.17 no VC9 version, how can I install php
SERVER variables in PHP $ _ SERVER explanation SERVER variables $ _ SERVER explanation: 1. $ _ SESSION [PHP_SELF] -- get the file name of the currently executing script 2, $ _ SERVER [SERVER_PROTOCOL] -- the name and version of the communication
Which PHP version is more stable than the other version? Win & nbsp; 2008, IIS + PHP + MYSQL & nbsp; mainly run the DEDE system, which version PHPMySQL PHP chooses is more stable
Example:
Which version is relatively stable?
Win 2008, IIS +
SERVER variables in PHP $ _ SERVER explanation SERVER variables $ _ SERVER explanation: 1. $ _ SESSION ['php _ SELF '] -- get the file name of the script being executed 2. $ _ SERVER ['server _ protocol'] -- the name of the communication PROTOCOL
Which PHP version is more stable than the other version? Win & nbsp; 2008, IIS + PHP + MYSQL & nbsp; mainly run the DEDE system and PHPMySQLIIS PHP to select which version is more stable
Example:
Which version is relatively stable?
Win 2008,
Disadvantages of IIS + PHP: due to the expensive price of the official Windows version, the general price of Windows 19000 Enterprise Edition is 30000. In fact, the configuration on Win7 is similar to that on Windows2003, but the installation and
PHP super global variable
$ GLOBALSContains a reference to a variable that is valid globally for each current script. The key of the array is the name of the global variable. $ GLOBALS array exists from PHP 3.
$ _ SERVERVariables are set by the Web
Getenv obtains the environment variable of the system.Syntax: string getenv (string varname); ----------- the varname parameter should be $ _ SERVER (SERVER super global variable array) or use putenv ("new = very new") to define new as the
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.