zoukankan      html  css  js  c++  java
  • 安装ecshop默认安装后的错误解决方案

    1,统一解决
    php.ini中的配置 error_reporting = E_ALL | E_STRICT
    这是说,显示那些不符合编码规范的警告(coding standards warnings)。
    建议取消error的输出,如果出于调试需要,应改为
    error_reporting = E_ALL & ~E_NOTICE

    2.首页出现报错:Only variables should be passed by referen
    找到出错行(includescls_template.php 文件的418行)
    $tag_sel = array_shift(explode(‘ ‘, $tag));
    改成:
    $tag_bak = explode(‘ ‘, $tag);
    $tag_sel = array_shift($tag_bak);
    因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值,后台更新缓存后正常。
    另一个地方同样修改(includeslib_main.php”文件的1329行):
    //$ext = end(explode(‘.’, $tmp));
    $ext_bak = explode(‘.’, $tmp);
    $ext = end($ext_bak);

     

    3.Strict Standards: Non-static method cls_image::gd_version() should not be called statically
    找到出错行(includeslib_base.php”文件的346行)
    return cls_image::gd_version();
    改成:
    $p = new cls_image();
    return $p->gd_version();
    是因为gd_version()方法未声明静态static,所以会出错。

     

    4. Strict standards: mktime(): You should be using the time() function instead
    错误行:$auth = mktime();
    PHP手册里http://cn2.php.net/manual/en/function.mktime.php有个Note:
    As of PHP 5.1, when called with no arguments, mktime() throws an E_STRICT notice: use the time() function instead.
    自从PHP5.1起,调用这个函数不传递参数,会出现一个 notice

    批量替换mktime()为@mktime()即可

  • 相关阅读:
    tectangular container
    WIFI
    微信小程序动态改变数组或对象中的某个属性值
    常用的正则表达式
    前端登录通过账号显示对应头像
    JS返回页面时自动回滚到历史浏览位置
    JavaScript让登录或搜索文本框自动获得焦点
    react脚手架应用
    npm教程3_脚手架原理以及bootstrap引入
    npm教程2
  • 原文地址:https://www.cnblogs.com/doseoer/p/4007700.html
Copyright © 2011-2022 走看看