<bdo id='Sm6ER'></bdo><ul id='Sm6ER'></ul>

      <small id='Sm6ER'></small><noframes id='Sm6ER'>

    1. <legend id='Sm6ER'><style id='Sm6ER'><dir id='Sm6ER'><q id='Sm6ER'></q></dir></style></legend>

      <tfoot id='Sm6ER'></tfoot>
      <i id='Sm6ER'><tr id='Sm6ER'><dt id='Sm6ER'><q id='Sm6ER'><span id='Sm6ER'><b id='Sm6ER'><form id='Sm6ER'><ins id='Sm6ER'></ins><ul id='Sm6ER'></ul><sub id='Sm6ER'></sub></form><legend id='Sm6ER'></legend><bdo id='Sm6ER'><pre id='Sm6ER'><center id='Sm6ER'></center></pre></bdo></b><th id='Sm6ER'></th></span></q></dt></tr></i><div id='Sm6ER'><tfoot id='Sm6ER'></tfoot><dl id='Sm6ER'><fieldset id='Sm6ER'></fieldset></dl></div>

        当 url 有变量时 $_GET 为空

        $_GET is empty when the url has variables(当 url 有变量时 $_GET 为空)

          <tbody id='4Ul4g'></tbody>

      1. <tfoot id='4Ul4g'></tfoot>

          <small id='4Ul4g'></small><noframes id='4Ul4g'>

            <legend id='4Ul4g'><style id='4Ul4g'><dir id='4Ul4g'><q id='4Ul4g'></q></dir></style></legend>
          • <i id='4Ul4g'><tr id='4Ul4g'><dt id='4Ul4g'><q id='4Ul4g'><span id='4Ul4g'><b id='4Ul4g'><form id='4Ul4g'><ins id='4Ul4g'></ins><ul id='4Ul4g'></ul><sub id='4Ul4g'></sub></form><legend id='4Ul4g'></legend><bdo id='4Ul4g'><pre id='4Ul4g'><center id='4Ul4g'></center></pre></bdo></b><th id='4Ul4g'></th></span></q></dt></tr></i><div id='4Ul4g'><tfoot id='4Ul4g'></tfoot><dl id='4Ul4g'><fieldset id='4Ul4g'></fieldset></dl></div>
              <bdo id='4Ul4g'></bdo><ul id='4Ul4g'></ul>

                  本文介绍了当 url 有变量时 $_GET 为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个看起来像这样的网址 reg.php?lang=no_NO&passkey=test 我正在尝试获取密码变量,但它一直显示为空白.

                  I have a url that look like this reg.php?lang=no_NO&passkey=testand im trying to get the passkey variable, but it keeps showing up blank.

                  当我尝试 print_r($_GET); 它打印 Array ( ) ?!怎么会这样?

                  When I try print_r($_GET); it prints Array ( ) ?! How can this happen?

                  网站看起来像这样

                      <?php
                  
                          print_r($_GET); 
                  
                          include('..libsSmarty.class.php');
                      ?>
                  
                      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                      <html xmlns="http://www.w3.org/1999/xhtml">
                      <head>
                      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                      <title>Activate account</title>
                  
                  (...html code.. )
                  
                  $smarty = new Smarty;
                  
                  //$smarty->force_compile = true;
                  $smarty->debugging = false;
                  $smarty->caching = false;
                  $smarty->cache_lifetime = 120;
                  
                  
                  // PHP gettext api
                  define('PROJECT_DIR', realpath('./'));
                  
                  (... define gettext ... )
                  
                  $passkey=$_GET['passkey'];
                  
                  (...work with passkey ...)
                  
                  $smarty->display('templatessite.tpl');
                  
                  ?>
                  
                  
                  </body>
                  </html>
                  

                  就是这样.我不明白为什么 $_GET 显示为空白.它已经让我发疯了一段时间了..

                  thats it. I can't understand why $_GET shows up blank. It's been driving me crazy for a while now..

                  推荐答案

                  当我遇到这样的问题时,我总是将我的脚本归结为基础.在脚本的最顶部试试这个:

                  When I run into something that stumps me like this, I always take my script right down to basics. Try this at the very top of your script:

                  var_dump($_GET);
                  exit;
                  

                  然后您可以查看它是否实际上是从钩子中获取变量.如果没有,那么可能有更深层次的东西……比如 PHP 真的与 Apache 一起运行吗?如果它有效,开始添加其他东西,直到它再次停止,你就可以开始缩小罪魁祸首的范围.

                  Then you can see if in fact it is getting the vars from the hook. If not, then there may be something deeper... like is PHP really running with Apache? If it works, start adding in other things until it stops again and you can start narrowing down the culprit.

                  这篇关于当 url 有变量时 $_GET 为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                    <tbody id='IYO8G'></tbody>

                  <i id='IYO8G'><tr id='IYO8G'><dt id='IYO8G'><q id='IYO8G'><span id='IYO8G'><b id='IYO8G'><form id='IYO8G'><ins id='IYO8G'></ins><ul id='IYO8G'></ul><sub id='IYO8G'></sub></form><legend id='IYO8G'></legend><bdo id='IYO8G'><pre id='IYO8G'><center id='IYO8G'></center></pre></bdo></b><th id='IYO8G'></th></span></q></dt></tr></i><div id='IYO8G'><tfoot id='IYO8G'></tfoot><dl id='IYO8G'><fieldset id='IYO8G'></fieldset></dl></div>

                    <small id='IYO8G'></small><noframes id='IYO8G'>

                    <tfoot id='IYO8G'></tfoot>
                    • <bdo id='IYO8G'></bdo><ul id='IYO8G'></ul>
                        <legend id='IYO8G'><style id='IYO8G'><dir id='IYO8G'><q id='IYO8G'></q></dir></style></legend>