zoukankan      html  css  js  c++  java
  • php中使用end方法报错

    1. <b>Strict Standards</b>:  Only variables should be passed by reference in <b>

      1.如果在使用end()时出现这个错误,那么原因可能是参数的问题,让我们找到手册中的end()函数API,如图所示;

      Only variables should be passed by referen
    2.  

      2.可以看到end的参数是一个引用(reference),如果把一个变量的引用作为一个参数传给函数,是没有任何问题的,但是如果把一个变量的分割表达式直接作为参数传给end()函数,就会出现这个错误;

      Only variables should be passed by referen
    3.  

      3.解决方案:

      <1>$temp = explode(',', $example);

      return end($temp);

      先将需要分割的变量分割成数组,保存到一个临时变量中,然后使用end()函数

      <2>更改错误配置:

      error_reporting(E_ALL ^ E_NOTICE);

      Only variables should be passed by referen
    4. 4

      4.在安装Ecshop时,可能会报出如下错误:

      Strict Standards: Only variables should be passed by reference in E:ToolsECShop_V2.7.3_UTF8_release1106uploadincludescls_template.phpon line 418

      ###########################################

      ###                              解决方案同上                             ###

      ###########################################

  • 相关阅读:
    Effective C++学习笔记:确定基类有虚析构函数
    WPF和Silverlight程序中DispatcherTimer与Timer的区别
    2011.12.23
    WP7里的JSON解析
    2011.11.16
    2011.12.21
    2011.11.18
    2011.11.17
    2011.11.24
    WebClient does not support concurrent I/O operations 错误的解决办法
  • 原文地址:https://www.cnblogs.com/gosky/p/4869501.html
Copyright © 2011-2022 走看看