我遇到了问题并且没有想法.
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 .未定义的变量.找不到解决办法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!