Transferred from: http://www.chinaz.com/program/2010/0129/105370.shtml$_server[' php_self '] #当前正在执行脚本的The file name, which is related to document root.$_server[' argv '] #传递给该脚本的参数.$_server[' argc '] #包含传递给The number of command-line arguments for
This article provides a detailed analysis of PHP's methods for obtaining the current url. If you need it, you can refer to it for help.
This article provides a detailed analysis of PHP's methods for obtaining the current url. If you need it, you can
These are also on the Internet to find hope to help you
$_server[' remote_port '//port. $_server[' server_name '//name of the server host. $_server[' php_self ']//is executing the script's filename $_server[' argv ']//parameters passed to the
Reinforce the PHP environment ). Author: When Alberta PHP is running as an Apache module, Apache's security plays a leading role. Therefore, if the configuration is correct, PHP should be a very safe environment, but if PHP is by Albert
When PHP is
Some server information is often used in php programming. I paste the commonly used information in highlighted mode, and the rest will be placed behind it for future reference.
The code is as follows:
$ _ SERVER ['http _ ACCEPT_LANGUAGE '] //
Php variable usage method 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: $ _
$ _ SERVER and php_server in PHP. $ _ SERVER usage instructions in PHP. some SERVER information is often used in PHP programming. the detailed parameters of $ _ SERVER are sorted out for future use. $ _ PHP $ _ SERVER and php_server
Some SERVER
There are several ways to get URL address bar parameters:$_server["Server_port"]//get port$_server[' Http_host ']//get the domain name or host address such as www.sina.com or music.sina.com$_server[' server_name ']//get the domain name or host
In PHP, the $ _ SERVER variable sorts out the current url :. $ _ SERVER [HTTP_HOST]. $ _ SERVER [PHP_SELF]; $ _ SERVER variable summary $ _ SERVER [QUERY_STRING] query string. $ _ SERVER [DOCUMENT_ROOT] $ _ SERVER variable sorting in PHP currently
Compile and install the LAMP source code package to implement PHP as a module and FastCGI separation:
Httpd-2.4.9
Apache2.4.9 compile the installation package
Apr-1.5.1
Apache Portable Runtime Library
SAPI: ServerApplicationProgrammingInterface server-side application programming port. It is the interface for PHP to interact with other applications. There are many ways to execute PHP scripts, either through the Web server or
SAPI: Server
The port used by the server. The default value is "80 ". If you use an SSL secure connection, this value is the HTTP port you set.
For example, I need to obtain the current URL address.
$ Url_this = "http: //". $ _ SERVER ['http _ host']. $ _ SERVER
PHP installation tips FAQ 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 APACHE
Php for php-5.2. ini Chinese version (2); [updated on January 3,]; ========================================================== =================================== ;; ============================================ configuration command details for php
Http://www.cppblog.com/woaidongmao/archive/2011/06/21/149092.htmlWhat is fastcgi?FastCGI is a language-independent, extensible architecture for CGI open extensions whose main behavior is to keep the CGI interpreter process in memory and thus achieve
PHP gets the current script URL (only path)
Copy CodeThe code is as follows:
function Getcururl ()
{
if (!empty ($_server["Request_uri"))
{
$scrtName = $_server["Request_uri"];
$nowurl = $scrtName;
}
Else
{
$scrtName = $_server["Php_self"];
if
发起http请求后 network会显示各类加载的资源,php有什么办法获取某一type的name size等信息吗?
Is it possible to use the Curl Head protocol?
Reply content:
发起http请求后 network会显示各类加载的资源,php有什么办法获取某一type的name size等信息吗?
Is it possible to use the Curl Head protocol?
$ _ 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;] include the
$_server instructions for use in PHP, php_server instructions for use
PHP programming often need to use some of the server's information, special $_server detailed parameters to organize, convenient for later use.
$_server[' php_self ')
Which PHP mode? Apache vs CGI vs fastcgi,apachefastcgi
Which PHP mode? Apache vs CGI vs FastCGI
There is multiple ways to execute PHP scripts on a Web server. We ' re often asked about the difference between these modes and so here it is!We offer
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.