I have a website that uses register_globals. My local php version is 5.6. I know that register_globals is DEPRECATED since PHP 5.3.0 and REMOVED in PHP 5.4. But i have to make it work on PHP 5.6, Is there any way to make it work? And is there any problem when i develop on PHP 5.6 and deploy it to production which is use PHP 5.2? Thank you
1条回答 默认 最新
- dsuikgi9199 2016-04-08 01:13关注
It is not possible to enable as feature of PHP, but I have developed a library to emulate
register_globals
.merciful_polluter emulate
register_globals
andmagic_quotes_gpc
(Both were removed in PHP 5.4)<?php /** * example.com/?foo=3&bar=12 */ (new Gongo\MercifulPolluter\Requst)->pollute(); global $foo, $bar; var_dump($foo, $bar); /** * int(3) * int(12) */
Support PHP versions are 5.4, 5.5, 5.6 and 7.0.
CAUTION: This library is just a emulator
解决 无用评论 打赏 举报
悬赏问题
- ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
- ¥15 一直显示正在等待HID—ISP
- ¥15 Python turtle 画图
- ¥15 关于大棚监测的pcb板设计
- ¥15 stm32开发clion时遇到的编译问题
- ¥15 lna设计 源简并电感型共源放大器
- ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
- ¥15 Vue3地图和异步函数使用
- ¥15 C++ yoloV5改写遇到的问题
- ¥20 win11修改中文用户名路径