zoukankan      html  css  js  c++  java
  • ecshop因为php版本过高而引起的报错。

    由于本人的php版本已经为

    5.5.15

    1、Strict Standards: Non-static method cls_image::gd_version() should not be called statically
       未声明静态static
       将return cls_image::gd_version();
        替换为
        $p = new cls_image();
        return $p->gd_version();
    2、Strict Standards: Only variables should be passed by reference
       
     变量应该通过引用传递
        将$tag_sel = array_shift(explode(' ', $tag));
       替换为
       $tag_arr = explode(' ', $tag);
      $tag_sel = array_shift($tag_arr);
    3、Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in
        将 return preg_replace("/{([^}{ ]*)}/e", "$this->select('\1');", $source);
       替换为
       return preg_replace_callback  ("/{([^}{ ]*)}/", function($r) { return $this->select($r[1]); },    $source);
    4、Strict Standards: Redefining already defined constructor for class paypal

       PHP 类,有两种构造函数,一种是跟类同名的函数,一种是 ____construct()。从PHP5.4开始,对这两个函数出现的顺序做了最严格的定义,必须是 ____construct() 在前,同名函数在后
    例如:
    function __construct()
        {
            $this->paypal();
        }
       
        function paypal()
        {
        }
    5、mktime(): You should be using the time() function instead
    mktime()方法不带参数被调用
    将$auth = mktime();
    替换为
    $auth = time();
    6、Strict Standards: Declaration of vbb::set_cookie() should be compatible with integrate::set_cookie($username = '', $remember = NULL)
    子类的函数跟父类的同名,必须使子类的函数参数跟父类的对应函数参数个数相同
    依据错误提示,修改例如:
    function set_cookie ($username="")
    改为
    function set_cookie ($username="", $remember = NULL)
    7、Parse error: syntax error, unexpected ';'
    语法错误,缺少;或者echo没有输出值

  • 相关阅读:
    npm 常用命令
    jquery 滚动事件
    移动端触控事件封装(完整版)
    带动画的分页
    手机号码 座机号码验证
    js常用 弹出确认 取消对话框
    jQuery之select的option怎样绑定事件
    jQuery如何停止元素的animate动画,还有怎样判断是否处于动画状态
    jQuery live()方法使用及变更(事件委托)
    Could not publish server configuration for Tomcat v6.0 Server at localhost. Multiple Contexts have a path of "/tm".
  • 原文地址:https://www.cnblogs.com/zjj-coder/p/4590837.html
Copyright © 2011-2022 走看看