php7下error类出错,这个是php7下保留的类名

share98 2016-07-31 15:40:41

把 system/config/config.php里面的

            $config
            ->
            webRoot 
            = 
            getWebRoot
            (
            
            ); 
改成

            $config
            ->
            webRoot 
            = 
            getWebRoot
            (
            true
            );

就提示错误,说是与php 7内置的error类冲突,错误提示如下


Fatal error: Cannot declare class error, because the name is already in use in E:\UPUPW_AP\htdocs\chanzhi2\system\module\error\control.php on line 0

15:34:01 Cannot declare class error, because the name is already in use in E:\UPUPW_AP\htdocs\chanzhi2\system\module\error\control.php on line 0 when visiting chanzhi2

回帖列表
chujilu 2016-08-01 14:11:53
访问哪个页面的出现的,发一下网址。还有这个为什么要修改?
share98 2016-08-01 13:05:08
报告页面的url地址怎么看?是不是就是我上面说的,看system/tmp/log 下的php开头的日志?
share98 2016-08-01 12:49:00

报错页面的url地址:system/module/error/control.php,log里的记录如下


12:40:30 Cannot declare class error, because the name is already in use in E:\UPUPW_AP\htdocs\chanzhi2\system\module\error\control.php on line 0 when visiting chanzhi2




另外要说明的是,不修改system/config/config.php里面的
$config>webRoot() 就不会报错,我的环境是windows 10安装的Apache+php7+MariaDB

chujilu 2016-08-01 11:30:00
报错和修改的内容看起来没有关系,编辑system/config/my.php里的debug参数值为true,发一下报错页面的url地址。
share98 2016-07-31 15:41:45
是chanzhiEPS.5.3.4版
1/ 1
浙ICP备14025715号-9
ZSITE8.6