;;;;;;;;;;;;
;; grammar;;
; The syntax of the file is very simple. whitespace characters and lines beginning with semicolons are simply ignored.
; Chapter headings (For example: [PHP]) are also simply ignored, even though they may have some meaning
$ _ SERVER [& amp; #39; PHP_SELF & amp; #39;] # file name of the script being executed, which is related to documentroot. $ _ SERVER [& amp; #39; argv & amp; #39;] # parameters passed to the script. $ _ SERVER [& amp; #39; argc & amp; #39;] #
$_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 programming often need to use some of the server's information, special $_server detailed parameters to organize, convenient for later use.Summarized as follows:$_server[' php_self '] #当前正在执行脚本的The file name, which is related to document
PHP.ini Chinese version (ii) for php-5.2
; [Updated 2008-3-2];=====================================================================;; ============================= Configuration Instruction Detailed ========================================;========
Apache
Frequent users of the Internet will encounter this situation: When accessing some of the site's resources, the browser pops up a dialog box that asks for a user name and password to gain access to the resource. This is a technology of user
Pre-defined variablesServer variable: $_serverNote: Used in PHP 4.1.0 and later versions. Previous versions, using the $HTTP _server_vars.$_server is an array that contains such things as the head (headers), Path (paths), and script location
For example, I need to obtain the current URL address.$ Url_this = "http: //". $ _ SERVER ['HTTP _ host']. $ _ SERVER ['php _ SELF '];Echo $ url_this;
Http: // localhost/lu. php
SERVER variable: $ _ SERVERNote: PHP 4.1.0 and later versions are used.
$ _ Server ['php _ Self '] # File Name of the script being executed, which is related to document root.$ _ Server ['argv'] # parameters passed to the script.$ _ Server ['argc '] # contains the number of command line parameters passed to the Program (
Variable: $ _ server, used in PHP 4.1.0 and later versions. For earlier versions, use $ http_server_vars
Variable: $ _ ENV, used in PHP 4.1.0 and later versions. For earlier versions, use $ http_env_vars
Variable: $ _ cookie, used in PHP 4.1.0 and
CopyCode The Code is as follows: $ _ server ['HTTP _ accept_language '] // browser Language
$ _ Server ['remote _ ADDR '] // ip address of the current user.
$ _ Server ['remote _ host'] // host name of the current user
$ _ Server ['request _ URI '] /
First, PHP retrieves the URL of the current page:
CopyCode The Code is as follows: // obtain the current Script URL
Function getcururl ()
{
If (! Empty ($ _ server ["request_uri"])
{
$ Scriptname = $ _ server ["request_uri"];
$ Nowurl = $
Four Common php run modes and php4 run
SAPI: Server Application Programming Interface Server Application Programming port. It is the interface for php to interact with other applications. There are many ways to execute php scripts, either through
Generally, PHP runs in two modes: CGI and Apache. as a CGI, connect is no different from pconnect, because every time CGI is run, resources are destroyed and cleared.
PHP can be used for continuous database connection when running as an Apache
The PHP tutorial provides multiple methods to obtain URL address bar parameters:
$ _ Server ["server_port"] // obtain the port
$ _ Server ['HTTP _ host'] // get the domain name or host address$ _ Server ['server _ name'] // get the domain name or
$_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
Apache HTTP Server is a modular software that allows managers to choose modules contained in the core to crop functions. Static inclusion can be selected during compilationhttpdBinary Image modules can also be compiledhttpdDSO is a dynamic shared
Source: Detailed parameters and descriptions of $_server in PHP$_server[' php_self ') #当前正在执行脚本的文件名, related to document root. $_server[' argv '] #传递给该脚本的参数. $_server[' argc '] #包含传递给程序的命令行参数的个数 (if run in command-line mode). $_server['
$_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
Apache configuration file httpd.conf Chinese detailed## The configuration file based on the NCSA server is written by Rob McCool, Longzi translation## Apache Server master configuration file. Includes directory settings for server directives.# More
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.