$_GET .未定义的变量.找不到解决办法 [英] $_GET . Undefined Variable. Cant find solution

查看:45
本文介绍了$_GET .未定义的变量.找不到解决办法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了问题并且没有想法.

I'm having an issue and am out of ideas.

我试图从 URL 获取参数,但 PHP 坚持说该变量未定义.

I'm trying to get a parameter from the URL, but PHP insists in saying that the variable is not defined.

网址是

http://localhost/trendwatcher/index.php?date=2014-10-18

脚本类似于

<?php include "header.php"; ?>

        <section id="stats">
            Showing trends for <?php echo $GET_["date"];  ?>
        </section>

最后,错误:

Showing trends for 
Notice: Undefined variable: GET_ in C:xampphtdocs	rendwatcherindex.php on line 4

有人有什么想法吗?

谢谢!

推荐答案

从以下位置修复您的代码:

Fix your code from:

<section id="stats">
     Showing trends for <?php echo $GET_["date"];  ?>
</section>

<section id="stats">
     Showing trends for <?php echo $_GET["date"];  ?>
</section>

这篇关于$_GET .未定义的变量.找不到解决办法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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