How to get $ _GET variables in PHP

I am working on an application created many years ago that recently stopped working correctly. The old programmer said that he can access variables $_GETor $_POST, without reading them from $_GET[] array, but throughregister_globals

I want to ask: what are the different ways to access variables $_GETwithout using an array $_GET[](for example, direct paths?) And, if known, how can I check if this application uses any of them?

Thank you in advance

EDIT . The other ways that I remembered were register_globals, not magic_quotes. In addition, I do not want to use it , but I found out if it was used and is outdated in the last server update (which may explain why the application stopped working correctly)

EDIT . My English is terrible today. As I explained in one of the answers: I need to check whether the original programmer used some obscure and / or outdated method to get variables from the query string in PHP, so the application is now working incorrectly or not initialized

IMPORTANT CHANGE : import_request_variablesdisconnected from the table, it is not used. All arrays are $_also outside the table, because the last update did not break them (=> they still work). How to determine which variables are initialized with register_globals?

GET OTHER IMAGES : I found this:

foreach ($_POST as $k => $v) {
  eval("\$".$k." = '".$v."';");
}
foreach ($_GET as $k => $v) {
  eval("\$".$k." = '".$v."';");
}

Perhaps it was damaged by one of the latest updates (maximum 1 week ago)?

+3
source share
5 answers

" " , " " ... BTW Register Globals - ( PHP 5.3.0)!

:. , " ", $_GET . , index.php?id=123 $id PHP-. , , script , $id / , (!) , ...

+4
+2

$_SERVER["QUERY_STRING"] GET.

, , ​​ , .

, , , .

PHP "" , , , .

+2

, , PHP register_globals. $_GET['some_var'] $_POST $some_var . , , .

+1

Register Globals - , PHP-.

PHP GET POST "" - , $_GET['myvar'] $myvar.

, , , . , .

, , , , , , , . , .

+1

Source: https://habr.com/ru/post/1774305/


All Articles