当前位置:网站首页>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。
边栏推荐
- 0214-27100 a day with little fluctuation
- Uploads labs range (with source code analysis) (under update)
- How idea starts run dashboard
- 用同花顺炒股开户安全吗?
- Is it safe to open an account with flush?
- [combinatorics] non descending path problem (outline of non descending path problem | basic model of non descending path problem | non descending path problem expansion model 1 non origin starting poi
- 初试scikit-learn库
- Asemi rectifier bridge umb10f parameters, umb10f specifications, umb10f package
- Qt插件之自定义插件构建和使用
- Get the executable path through the process PID (queryfullprocessimagename)
猜你喜欢

记一次jar包冲突解决过程

First knowledge of database

Please be prepared to lose your job at any time within 3 years?

Stm32f103c8t6 firmware library lighting

MongoDB 的安装和基本操作

半监督学习
![App mobile terminal test [5] file writing and reading](/img/f1/4bff6e66b77d0f867bf7237019e982.png)
App mobile terminal test [5] file writing and reading

Mb10m-asemi rectifier bridge mb10m

Myopia: take off or match glasses? These problems must be understood clearly first

突破100万,剑指200万!
随机推荐
[proteus simulation] 74hc595+74ls154 drive display 16x16 dot matrix
Asemi rectifier bridge umb10f parameters, umb10f specifications, umb10f package
Nine ways to define methods in scala- Nine ways to define a method in Scala?
【Proteus仿真】8×8LED点阵屏仿电梯数字滚动显示
MB10M-ASEMI整流桥MB10M
The difference between mutually exclusive objects and critical areas
[redis foundation] understand redis persistence mechanism together (rdb+aof graphic explanation)
The mixlab editing team is recruiting teammates~~
"Remake Apple product UI with Android" (2) -- silky Appstore card transition animation
From the 18th line to the first line, the new story of the network security industry
记一次jar包冲突解决过程
Record a jar package conflict resolution process
Detailed explanation of four modes of distributed transaction (Seata)
六月 致 -.-- -..- -
App移动端测试【5】文件的写入、读取
Client does not support authentication protocol requested by server; consider upgrading MySQL client
Multithread 02 thread join
首发!!lancet饿了么官方文档
Jmeter线程组功能介绍
工资3000,靠“视频剪辑”月入40000:会赚钱的人,从不靠拼命!