当前位置:网站首页>PHP中register_globals参数设置
PHP中register_globals参数设置
2022-07-03 16:08:00 【星哥玩云】
register_globals是php.ini里的一个配置,这个配置影响到php如何接收传递过来的参数。
1、当register_globals=Off的时候,下一个程序接收的时候应该用$_GET['user_name']和$_GET['user_pass']来接受传递过来的值。(注:当<form>的method属性为post的时候应该用$_POST['user_name']和$_POST['user_pass'])
2、当register_globals=On的时候,下一个程序可以直接使用$user_name和$user_pass来接受值。
顾名思义,register_globals的意思就是注册为全局变量,所以当On的时候,传递过来的值会被直接的注册为全局变量直接使用,而Off的时候,我们需要到特定的数组里去得到它。
register_globals= Off的情况不仅仅影响到如何获取从<form>、url传递过来的数据,也影响到session、cookie,对应的,得到session、cookie的方式应该为:$_SESSION[]、$_COOKIE。同时对于session的处理也有一些改变,所以一般还是设置为Off。
边栏推荐
- Vs2017 is driven by IP debugging (dual machine debugging)
- MB10M-ASEMI整流桥MB10M
- Persisting in output requires continuous learning
- Q2 encryption market investment and financing report in 2022: gamefi becomes an investment keyword
- EditText request focus - EditText request focus
- Rk3399 platform development series explanation (WiFi) 5.54. What is WiFi wireless LAN
- The accept attribute of the El upload upload component restricts the file type (detailed explanation of the case)
- Jmeter线程组功能介绍
- Using optimistic lock and pessimistic lock in MySQL to realize distributed lock
- Salary 3000, monthly income 40000 by "video editing": people who can make money never rely on hard work!
猜你喜欢
![[proteus simulation] 74hc595+74ls154 drive display 16x16 dot matrix](/img/d6/3c21c25f1c750f17aeb871124e80f4.png)
[proteus simulation] 74hc595+74ls154 drive display 16x16 dot matrix

Famous blackmail software stops operation and releases decryption keys. Most hospital IOT devices have security vulnerabilities | global network security hotspot on February 14

"Remake Apple product UI with Android" (2) -- silky Appstore card transition animation

Create gradle project

Secsha system 1- login function

记一次jar包冲突解决过程
![[list to map] collectors Tomap syntax sharing (case practice)](/img/ac/e02deb1cb237806d357a88fb812852.jpg)
[list to map] collectors Tomap syntax sharing (case practice)

The accept attribute of the El upload upload component restricts the file type (detailed explanation of the case)

Download and install common programs using AUR

App移动端测试【4】apk的操纵
随机推荐
[combinatorics] combinatorial identities (sum of variable terms 3 combinatorial identities | sum of variable terms 4 combinatorial identities | binomial theorem + derivation to prove combinatorial ide
“用Android复刻Apple产品UI”(2)——丝滑的AppStore卡片转场动画
Unity项目优化案例一
MB10M-ASEMI整流桥MB10M
半监督学习
Advanced Mathematics (Seventh Edition) Tongji University exercises 2-1 personal solutions
Pychart error updating package list: connect timed out
Initial test of scikit learn Library
uploads-labs靶场(附源码分析)(更新中)
EditText request focus - EditText request focus
App mobile terminal test [5] file writing and reading
[list to map] collectors Tomap syntax sharing (case practice)
Remote file contains actual operation
Microservice sentinel flow control degradation
首发!!lancet饿了么官方文档
用同花顺炒股开户安全吗?
《天天数学》连载56:二月二十五日
Microservice - declarative interface call openfeign
Three dimensional reconstruction of deep learning
Colab works with Google cloud disk