【发布时间】:2009-11-19 16:50:52
【问题描述】:
我有一个主页 (topic.php),在 URL 中包含 GET 信息,如下所示:
http://studio.byuipt.net/topic.php?topic=Debugger&desc=Helps%20find%20and%20solve%20problems%20with%20others%27%20code.
我在 topic.php 中有一个 div,“currLeader”,我在其中加载了另一个页面,getCurrLeader.php。 getCurrLeader.php 应该使用 url 的 $_GET 信息中的主题变量来进行 mysql 搜索并返回相关信息。问题是,虽然 topic.php 上的脚本能够成功使用 extract($_GET),但我无法从 getCurrLeader.php extract($_GET) 语句中检索任何变量。我认为这两个页面都可以访问当前显示的 url。有没有其他方法可以从当前 url 中获取这些信息?
(因此,“主题”信息实际上存在于页面上具有 id 的元素中,我能够使用 jquery 成功检索它,但我无法找到一种方法,在同一个文件,将该值传递给我的 php 脚本)。
【问题讨论】:
-
getCurrLeader.php如何加载到topic.php中?
-
"我在 topic.php 中有一个 div,"currLeader",我在其中加载了另一个页面,getCurrLeader.php。" - 这是在哪里发生的?在服务器上还是在浏览器中?