• <bdo id='55apE'></bdo><ul id='55apE'></ul>

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

    <legend id='55apE'><style id='55apE'><dir id='55apE'><q id='55apE'></q></dir></style></legend>
  • <tfoot id='55apE'></tfoot>

      1. PHP 错误:“无法通过引用传递参数 2"

        时间:2023-07-31
      2. <tfoot id='Y98WE'></tfoot>

            <tbody id='Y98WE'></tbody>
              • <bdo id='Y98WE'></bdo><ul id='Y98WE'></ul>
                • <legend id='Y98WE'><style id='Y98WE'><dir id='Y98WE'><q id='Y98WE'></q></dir></style></legend>

                • <small id='Y98WE'></small><noframes id='Y98WE'>

                  <i id='Y98WE'><tr id='Y98WE'><dt id='Y98WE'><q id='Y98WE'><span id='Y98WE'><b id='Y98WE'><form id='Y98WE'><ins id='Y98WE'></ins><ul id='Y98WE'></ul><sub id='Y98WE'></sub></form><legend id='Y98WE'></legend><bdo id='Y98WE'><pre id='Y98WE'><center id='Y98WE'></center></pre></bdo></b><th id='Y98WE'></th></span></q></dt></tr></i><div id='Y98WE'><tfoot id='Y98WE'></tfoot><dl id='Y98WE'><fieldset id='Y98WE'></fieldset></dl></div>
                  本文介绍了PHP 错误:“无法通过引用传递参数 2"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我只是需要帮助解决这个我不太明白的 PHP 错误:

                  I just need help on this PHP error which I do not quite understand:

                  致命错误:无法在第 13 行的/web/stud/openup/inactivatesession.php 中通过引用传递参数 2

                  Fatal error: Cannot pass parameter 2 by reference in /web/stud/openup/inactivatesession.php on line 13

                  <?php
                  
                  error_reporting(E_ALL);
                  
                  include('connect.php');
                  
                  $createDate = mktime(0,0,0,09,05,date("Y"));
                  $selectedDate =  date('d-m-Y', ($createDate));
                  
                  $sql = "UPDATE Session SET Active = ? WHERE DATE_FORMAT(SessionDate,'%Y-%m-%d' ) <= ?";                                         
                  $update = $mysqli->prepare($sql);
                  $update->bind_param("is", 0, $selectedDate);  //LINE 13
                  $update->execute();
                  
                  ?>
                  

                  这个错误是什么意思?如何修复此错误?

                  What does this error mean? How can this error be fixed?

                  推荐答案

                  该错误意味着第二个参数应该是对变量的引用.

                  The error means that the 2nd argument is expected to be a reference to a variable.

                  由于您处理的不是变量,而是值 0 的整数,因此会产生上述错误.

                  Since you are not handing a variable but an integer of value 0, it generates said error.

                  要避免这种情况,请执行以下操作:

                  To circumvent this do:

                  $a = 0;
                  $update->bind_param("is", $a, $selectedDate);  //LINE 13
                  

                  如果您想了解正在发生的事情,而不是仅仅修复您的致命错误,请阅读以下内容:http://php.net/manual/en/language.references.pass.php

                  In case you want to understand what is happening, as opposed to just fixing your Fatal error, read this: http://php.net/manual/en/language.references.pass.php

                  这篇关于PHP 错误:“无法通过引用传递参数 2"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:致命错误:调用未定义的函数 mysqli_connect() 下一篇:Mysqli更新抛出调用成员函数bind_param()错误

                  相关文章

                  最新文章

                • <tfoot id='vkygK'></tfoot>

                    1. <small id='vkygK'></small><noframes id='vkygK'>

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