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()即可

  • 相关阅读:
    cs
    PC管理端与评委云打分配合步骤及疑难问题汇编,即如何使用PC管理端的云服务管理功能
    B.数据结构(栈和队列)
    13.Python(模块)
    A.数据结构(线性表)
    c.Matlab(数据和函数的可视化)
    b.Matlab(字符串)
    12.Python(装饰器)
    11.Python(生成器)
    10.Python(高级特性)
  • 原文地址:https://www.cnblogs.com/doseoer/p/4007700.html
Copyright © 2011-2022 走看看