感到困惑的是没有$ _GET [英] Baffled by no $_GET

查看:56
本文介绍了感到困惑的是没有$ _GET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要对我刚刚继承的一些代码做一些修改,而且

代码让我感到困惑。


在一个页面上,caller.php,使用方法得到一个锚点

href =" foo.php?bar = 123"。在foo.php上,URL显示参数。所以

远,那么好。


在foo.php中没有$ _GET语句来解读bar中的值。

此外,我为$ _GET和

$ _REQUEST完成了整个代码库的grep,但没有。然后代码继续测试$ bar

并使用它的值来构建一个sql语句。 (还有其他

参数可以放入URL中,例如bar1,bar2,

等等,这些参数都是在构建正确的sql语句时测试的)。


这个应用程序使用全局变量。我为整个代码库做了一个grep的全局

并没有找到bar,bar1等。


我的问题是如何被调用的页面是否可以获得

url参数的值,而无需使用$ _GET或$ _REQUEST?"。

I need to do some modifications on some code I just inherited and that
code has me baffled.

On one page, caller.php, with method get there is an anchor with
href="foo.php?bar=123". On foo.php, the URL shows the parameter. So
far, so good.

In foo.php there is no $_GET statement to decipher the value from bar.
Furthermore, I did a grep of the entire code base for $_GET and for
$_REQUEST and there was none. The code then proceeds to test on $bar
and use its value to build an sql statement. (There are other
parameters that could have been put into the URL such as bar1, bar2,
etc. and these are all tested in building the proper sql statement).

This app uses globals. I did a grep of the entire codebase for global
and didn''t find bar, bar1, etc.

The question I have is "how could the invoked page get the value of the
url parameters without having used a $_GET or a $_REQUEST?".

推荐答案

_GET语句来解析bar中的值。

此外,我为
_GET statement to decipher the value from bar.
Furthermore, I did a grep of the entire code base for


_GET和
_GET and for


_REQUEST并且没有。然后代码继续测试
_REQUEST and there was none. The code then proceeds to test on


这篇关于感到困惑的是没有$ _GET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆