This article mainly introduces the usage of the smarty built-in function foreach, and analyzes the usage tips and precautions of the smarty built-in foreach function, for more information about the usage of the smarty built-in function foreach, see
In the httpd.conf file, the following configuration is available (note: The comment content of the httpd.conf file is removed)
Listen 80ServerName localhost
allowoverride None Require all Denieddocumentroot "E:"
Options
$ _ 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 number of command line parameters passed to the program (if it is
$ _ 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
First, PHP gets the URL of the current page:
Copy the Code code as follows:
Get the current script URLfunction Getcururl (){if (!empty ($_server["Request_uri")){$scriptName = $_server["Request_uri"];$nowurl = $scriptName;}Else{$scriptName =
The file name of the script to be executed, which is related to documentroot .. $ _ SERVER [PHP_SELF] # file name of the script being executed, which is related to documentroot. $ _ SERVER [argv] # parameters passed to the script. $ _ SERVER [argc] #
$_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 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
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
The benefits of generating static html files in php I believe anyone who has done a website knows that it can greatly improve the server load capacity. let's take a look at the principle of generating static html files in php: & amp; lt ;?
PHP pre-defined $_server instances, all $_server begin with predefined service variables. , _server instances
PhpHeader("Content-type:text/html;charset=utf8");Echo"Error_reporting=>".error_reporting(E_all)."";Echo"Php_self=>".$_server[' Php_self '
Apache configuration multisite, Apache configuration site
In the httpd.conf file, the following configuration is available (note: The comment content of the httpd.conf file is removed)
Listen 80ServerName localhost
allowoverride None
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
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
Web server implementationweb服务器实现了http和相关的tcp连接处理,负责管理web服务器提供的资源,以及对web服务器的配置、控制、及扩展方面的管理。
There are many kinds of generic software Web servers, mostly from three companies, Apache, Microsoft and Sun IPlant.
Web server devices are
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.