张文保的博客
张文保 · Paul Zhang

Engineering the Future
功不唐捐,玉汝于成

ECSHOP

ECSHOP在PHP5.3以上出现构造函数报错的解决方法

PHP高版本ECSHOP报错,在PHP5.3以上的版本会出现下面这些错误:
Strict Standards: Redefining already defined constructor for class chinabank in /data/web/includes/modules/payment/chinabank.php on line 85

Strict Standards: Redefining already defined constructor for class paypal_ec in /data/web/includes/modules/payment/paypal_ec.php on line 96

Strict Standards: Redefining already defined constructor for class shenzhou in /data/web/includes/modules/payment/shenzhou.php on line 81

Strict Standards: Redefining already defined constructor for class ips in /data/web/includes/modules/payment/ips.php on line 82

Strict Standards: Redefining already defined constructor for class balance in /data/web/includes/modules/payment/balance.php on line 79

Strict Standards: Redefining already defined constructor for class alipay in /data/web/includes/modules/payment/alipay.php on line 85

Strict Standards: Redefining already defined constructor for class tenpay in /data/web/includes/modules/payment/tenpay.php on line 83

Strict Standards: Redefining already defined constructor for class post in /data/web/includes/modules/payment/post.php on line 79

Strict Standards: Redefining already defined constructor for class paypal in /data/web/includes/modules/payment/paypal.php on line 82

Strict Standards: Redefining already defined constructor for class tenpayc2c in /data/web/includes/modules/payment/tenpayc2c.php on line 83

Strict Standards: Redefining already defined constructor for class cappay in /data/web/includes/modules/payment/cappay.php on line 81

Strict Standards: Redefining already defined constructor for class bank in /data/web/includes/modules/payment/bank.php on line 79

Strict Standards: Redefining already defined constructor for class kuaiqian in /data/web/includes/modules/payment/kuaiqian.php on line 83

Strict Standards: Redefining already defined constructor for class cod in /data/web/includes/modules/payment/cod.php on line 82

解决办法:
将所有的构造函数放到前面:
如alipay.php

function __construct()
{
$this->alipay();
}

放到

function alipay()
{
}

前面。

相关文章
本文标题:《ECSHOP在PHP5.3以上出现构造函数报错的解决方法》
网址:https://zhangwenbao.com/ecshop-strict-standards-redefining-already-defined-constructor-for-class.html
作者:张文保
发布时间:2017-03-14
许可协议:CC BY-NC-SA 4.0
发表新评论
SSL安全认证