当前位置:网站首页>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。
边栏推荐
- CString getbuffer and releasebuffer instructions
- The difference between calling by value and simulating calling by reference
- Reflection on some things
- 首发!!lancet饿了么官方文档
- Pyinstaller is not an internal or external command, nor is it a runnable program or batch file
- Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (4)
- 分布式事务(Seata) 四大模式详解
- Go language self-study series | golang switch statement
- 无心剑中译泰戈尔《漂鸟集(1~10)》
- 几种常见IO模型的原理
猜你喜欢

近视:摘镜or配镜?这些问题必须先了解清楚

Remote file contains actual operation
![App mobile terminal test [5] file writing and reading](/img/f1/4bff6e66b77d0f867bf7237019e982.png)
App mobile terminal test [5] file writing and reading

How to use AAB to APK and APK to AAB of Google play apps on the shelves

NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线

Automatic generation of client code from flask server code -- Introduction to flask native stubs Library

Salary 3000, monthly income 40000 by "video editing": people who can make money never rely on hard work!

Uploads labs range (with source code analysis) (under update)

Microservice API gateway zuul
![SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]](/img/3b/7523eca5bbcdbba29d9b7f6e4791a5.jpg)
SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]
随机推荐
“用Android复刻Apple产品UI”(3)—优雅的数据统计图表
App移动端测试【5】文件的写入、读取
远程文件包含实操
CString getbuffer and releasebuffer instructions
nifi从入门到实战(保姆级教程)——flow
一些事情的反思
Secsha system 1- login function
Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (II)
Colab works with Google cloud disk
Effect of ARP package on FTP dump under vxworks-6.6 system
无心剑中译泰戈尔《漂鸟集(1~10)》
Is it safe to open an account with flush?
Chinese translation of Tagore's floating birds (1~10)
From the 18th line to the first line, the new story of the network security industry
Batch files: list all files in a directory with relative paths - batch files: list all files in a directory with relative paths
Project -- high concurrency memory pool
Go语言自学系列 | golang中的if else语句
Nine ways to define methods in scala- Nine ways to define a method in Scala?
Redis在Windows以及Linux系统下的安装
App移动端测试【4】apk的操纵