Php pre-defined variable help (with instance ). From php4.1.0, the preferred method for getting external variables is to use the Superglobal variables mentioned below. Prior to this, people were either dependent on register_globals, or long
The preferred method for php to obtain external variables is to use the hyperglobal variables mentioned below. Prior to this, people were either dependent on register_globals or long pre-defined PHP array ($ HTTP _ * _ VARS ). Starting from PHP5.0.0
The preferred method for php to obtain external variables is to use the hyperglobal variables mentioned below. Prior to this, people were either dependent on register_globals or long pre-defined PHP array ($ HTTP _ * _ VARS ). From PHP5.0.0, PHP
Intended audience
Introduction
Register_globals
How does the variables get to PHP?
From the URL
From a Form
From a Cookie
From the environment or the Server
Use the superglobals!
Why are they called superglobals?
Other coding techniques
Ways
One, CGI mode installation security
Second, the Apache module to install security
When PHP is installed as an Apache module, it inherits the privileges of the Apache user (usually "nobody"). This has some impact on security and authentication. For
Php application development-file download details
This article introduces some code for downloading files using php. For more information, see.1. the php download function uses the header () and readfile () functions to download files.
[PHP] predefined variable (1) $ _ server (Appendix: getting the current URL example)
For example, I need to obtain the current URL address.
$ Url_this ="Http: // ". $ _ Server['HTTP _ host']. $ _ server ['php _ Self '];Echo $ url_this;
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
debugging software is not exactly a fun job for developers. the most widely used Debugger for PHP still seems to be a var_dump () statement, possibly in conjunction with die () to halt program execution at a certain point. while there is nothing
PHP obtains the path, name, and server path of the file running before the current period. & lt ;? Phpecho displays the relative path and file name of the script file :. $ _ SERVER [PHP_SELF]. & lt; br & gt; echo display the CGI script
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.