0

I'm using PHP 7.1.12 using XAMPP on Windows 10 operating system.

Today, I was just checking the output of phpinfo() in my web browser and surprisingly I no where found an entry for the directive register_globals in it.

Almost on 70% of its pages, the PHP Manual mentions this directive register_globals has been deprecated and should not be used but I can't even see the respective entry in php.ini file. So, is the respective entry has been completely removed from the PHP distribution?

Also, let me know whether old $HTTP_*_VARS arrays are accessible to me i.e. in PHP 7.1.12 or not or they also have been removed from the PHP distribution?

4

1 回答 1

0

register_globals已在 PHP5.4 左右被删除,您仍然可以模拟行为,但这是一种不好的做法

您可以通过向用户编写的register_globals()函数添加函数调用来模拟其行为,如下所示: https ://pageconfig.com/post/register_globals-is-back-php-implementation

或者通过将用户编写的脚本添加到每个执行的 php 文件中,如下所示: http ://www.kaffeetalk.de/using-register_globals-in-php-5-5/

$ HTTP_GET_VARS现在被称为 $_GET在 PHP5.4 中被删除:http: //php.net/manual/en/tutorial.useful.php

于 2017-12-20T05:08:39.467 回答