Php variables and some applicable methods. Variable: $ _ SERVER, used in PHP4.1.0 and later versions. For previous versions, use $ HTTP_SERVER_VARS variable: $ _ ENV for PHP4.1.0 and later versions. In earlier versions, the $ HTTP_ENV_VA variable $ _
PHP installation tips: FAQs (1 ). I. Q: I have installed the APACHE module of Unix by step, but the source code of my PHP script is displayed in the browser, or the browser prompts me to save the file. Why? A: This is 1,
Q: I have installed the
Detailed parameters and descriptions of $ _ SERVER in PHP. $ _ SERVER [PHP_SELF] # file name of the script being executed, which is related to documentroot. $ _ SERVER [argv] # parameters passed to the script. $ _ SERVER [argc] # contains the
$_server[' http_accept_language ']//browser language $_server[' REMOTE_ADDR ']//Current user IP. $_server[' remote_host '//Current user hostname $_server[' request_uri ']//url$_server[' remote_port ']//port. $_server[' server_name '//name of the
PHP tutorials get full URL address bar parameters in a variety of ways:
$_server["Server_port"]//get port
$_server[' Http_host ']//get the domain name or host address
$_server[' server_name ']//what does it mean to get a domain name or a host site
$_server[' php_self ') #当前正在执行脚本的文件名, related to document root.
$_server[' argv '] #传递给该脚本的参数.
$_server[' argc '] #包含传递给程序的命令行参数的个数 (if run in command-line mode).
$_server[' Gateway_interface ') #服务器使用的 the version of the CGI specification. For
PHP is a cross-platform server-side embedded scripting language. It borrowed a lot of C, Java, and Perl syntaxes and coupled with PHP's own features, enabling WEB developers to quickly write dynamic pages.
PHP is a cross-platform server-side
PHP obtains the complete URL of the current page through the pre-defined variable $ _ SERVER. $ _ SERVER is an array containing header information, path, and file location, which is created by the web SERVER, if you use the command line to run PHP,
Some SERVER information is often used in PHP programming. the detailed parameters of $ _ SERVER are sorted out to facilitate future use.
Some SERVER information is often used in PHP programming. the detailed parameters of $ _ SERVER are sorted out
For php-5.2 php. ini Chinese version (2); [UPDATES]; configuration instructions for php-5.2 php. ini Chinese version (2)
; [Updated on December 3,]
; ========================================================== ==================================
;; =
Variables: $_server, used in PHP 4.1.0 and later versions. Previous versions, using the $HTTP _server_vars
Variables: $_env, used in PHP 4.1.0 and later versions. Previous versions, using the $HTTP _env_vars
Variables: $_cookie, used in PHP 4.1.0
4 Common ways to run PHP
This article mainly introduces PHP 4 kinds of common operating modes, this article explains the CGI, FastCGI, Apache2handler, CLI and other 4 kinds of operation, the need for friends can refer to the following
Sapi:server
Meaning and usage of the $ _ SERVER variable in php $ _ SERVER [& amp; #39; PHP_SELF & amp; #39;] function usage # file name of the script being executed, related to documentroot. $ _ SERVER [& amp; #39; argv & amp; #39;] function usage # parameters
SERVER variable: $ _ SERVER Note: Used in PHP4.1.0 and later versions. In earlier versions, $ HTTP_SERVER_VARS is used. $ _ SERVER is an array containing headers, paths, and scriptlocations.
SERVER variable: $ _ SERVERNote: PHP 4.1.0 and later
$_server[' http_accept_language ']//browser language$_server[' REMOTE_ADDR '//Current user IP.$_server[' remote_host '///Current User host name$_server[' Request_uri ']//url$_server[' remote_port '//port.$_server[' server_name '//name of the server
1 $_server[' Php_self ']#The file name of the currently executing script, which is related to document root. 2 $_server[' argv ']#The arguments passed to the script. 3 $_server[' ARGC ']#contains the number of command-line arguments passed to the
$_server[' php_self '] #当前正在执行脚本的The file name, which is related to document root.$_server[' argv '] #传递给该脚本的参数.$_server[' argc '] #包含传递给The number of command-line arguments for the program (if run in command-line mode).$_server[' Gateway_interface '
$_server[' Php_self ']#The file name of the currently executing script, which is related to document root. $_server[' argv ']#The arguments passed to the script. $_server[' ARGC ']#contains the number of command-line arguments passed to the program (
PHP run modePHP run mode, is the way PHP executes, one is a separate executable program (usually EXE program), one is embedded in the form of a module in the server program run (usually DLL program).Independent execution, using CGI (Common Gateway
PHP programming often need to use some of the server's information, I put the commonly used in highlighting the way out, the rest is put in the back. Easy access later$_server['Http_accept_language']//Browser Language$_server['REMOTE_ADDR']//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.