ProblemDangers of setting register globals to TRUESolutionDangers of setting register globals to TRUEMany people have seen it very dangerous to set register globals to on. But how can this problem be solved ?? A lot of new users should not know! So
There is such a section in the Discuz code:If (isset ($ _ REQUEST ['globals']) OR isset ($ _ FILES ['globals']) {Exit ('request tainting attempted .');}Register_globals is a control option in php. It can be set to off or on. The default value is off.
As we all know, when register_globals = on in PHP. ini, various variables are injected with code, such as request variables from HTML forms. In addition, PHP does not require initialization before using variables. This may cause insecurity. If
The most controversial change in using Register Globals in PHP is that the default value of register_globals in the configuration file is changed from on to off from PHP & raquo; 4.2.0. The dependency on this option is so common that many people do
Dedecms limits the Register_globals.Because the Register_globals set control PHP variable access scope, if the opening will cause unnecessary security problems, so here it is forced to close, if the webmaster space does not support, you can use the
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
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
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 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.