Summary of various methods of php pre-defined variables. PHP provides a large number of predefined variables. Because many variables depend on the version and settings of the running server, and other factors, there is no detailed description
Several predefined variables $ _ SERVER in php: Usage summary and _ server summary. Php predefined variables $ _ SERVER usage summary, _ server summary examples in this article summarize the usage of php predefined variables $ _ SERVER. Share it
The preferred method for obtaining external variables from PHP 4.1.0 is to use the Super global variables mentioned below. Before that, people either relied on register_globals, or long predefined PHP arrays ($HTTP _*_vars). Long-form PHP predefined
PHP Several predefined variables $_server usage Summary, _server Summary
This paper summarizes the usage of several predefined variables $_server in PHP. Share to everyone for your reference. Specific as follows:
Copy the Code code as follows: Echo
Predefined variable 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. The object of the array is created by
1. Magic Constants
There are eight magic constants in PHP, and their values change as they change position in the code. These special constants are case insensitive.
Line: Returns the current row number in the file. Can also be written in
Some predefined variables in php $ _ SERVER usage summary and _ server Summary
This example summarizes the usage of several predefined variables $ _ SERVER in php. Share it with you for your reference. The details are as follows:
Copy codeThe Code
PHP predefined variable array type overview. PHP predefined variable array 1, $ _ SERVER Super global variable contains information created by the web SERVER, which provides information about the SERVER and customer configuration and the current
Summary of common predefined variables in php. Copy the code as follows :? Phpecho current operating system information. PHP_ OS .br; echo path and FILE name of this FILE:. _ FILE _. br; echo current PHP version information. PHP_VERSION.br
The code
Copy Code code as follows:
echo "Current operating system information." Php_os. " ";
Echo ' This file path and file name is: '. __file__. ' ';
echo "Current PHP version information." Php_version. " ";
?>
commonly used PHP
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.