当前位置:网站首页>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。
边栏推荐
- App mobile terminal test [3] ADB command
- Using optimistic lock and pessimistic lock in MySQL to realize distributed lock
- Asemi rectifier bridge umb10f parameters, umb10f specifications, umb10f package
- Is it safe to open an account with tongdaxin?
- Is it safe to open an account with flush?
- 面试官:JVM如何分配和回收堆外内存
- Intelij idea efficient skills (III)
- 远程办公之大家一同实现合作编辑资料和开发文档 | 社区征文
- [system safety] 43 PowerShell malicious code detection series (5) automatic extraction of ten thousand words from abstract syntax tree
- 【OpenCV 例程200篇】217. 鼠标交互获取多边形区域(ROI)
猜你喜欢

Mongodb installation and basic operation

Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (I)

ASEMI整流桥UMB10F参数,UMB10F规格,UMB10F封装

突破100万,剑指200万!

关于网页中的文本选择以及统计选中文本长度

MB10M-ASEMI整流桥MB10M

How can technology managers quickly improve leadership?

Microservices - load balancing ribbon
![[system safety] 43 PowerShell malicious code detection series (5) automatic extraction of ten thousand words from abstract syntax tree](/img/cd/00954b9c592c253d42e6a3b8298999.jpg)
[system safety] 43 PowerShell malicious code detection series (5) automatic extraction of ten thousand words from abstract syntax tree

Shell script import and export data
随机推荐
MongoDB 的安装和基本操作
切入点表达式
Myopia: take off or match glasses? These problems must be understood clearly first
【Proteus仿真】74HC595+74LS154驱动显示16X16点阵
How to thicken the brush in the graphical interface
《天天数学》连载56:二月二十五日
[combinatorics] summary of combinatorial identities (eleven combinatorial identities | proof methods of combinatorial identities | summation methods)*
pycharm错Error updating package list: connect timed out
[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
[系统安全] 四十三.Powershell恶意代码检测系列 (5)抽象语法树自动提取万字详解
1287. Elements that appear more than 25% in an ordered array
坚持输出需要不断学习
Mb10m-asemi rectifier bridge mb10m
Is it safe to open an account with tongdaxin?
The wonderful use of do{}while()
半监督学习
[combinatorics] combinatorial identities (sum of variable terms 3 combinatorial identities | sum of variable terms 4 combinatorial identities | binomial theorem + derivation to prove combinatorial ide
Subclass hides the function with the same name of the parent class
请求头不同国家和语言的表示
[system safety] 43 PowerShell malicious code detection series (5) automatic extraction of ten thousand words from abstract syntax tree