Home >php教程 >php手册 >PHP:Fatal error: Cannot redeclare class报错如何解决!

PHP:Fatal error: Cannot redeclare class报错如何解决!

WBOY
WBOYOriginal
2016-06-06 19:46:082031browse

今天将本地的php从5.2.9升级到5.3.8有如下报错: ( ! ) Fatal error: Cannot redeclare class db_class in E:\website\eurobeadszone\lib\db\db.class.php on line 10 Call Stack #TimeMemoryFunctionLocation 10.0009357256{main}( )..\index.php : 0 20.00

今天将本地的php从5.2.9升级到5.3.8有如下报错:

( ! ) Fatal error: Cannot redeclare class db_class in E:\website\eurobeadszone\lib\db\db.class.php on line 10 Call Stack #TimeMemoryFunctionLocation 10.0009357256{main}( )..\index.php:0 20.0023367856include_once( 'E:\website\svn-106\EuroBeadsZone\lib\globle.php' )..\index.php:39 30.01792019016base->__construct( )..\globle.php:8 40.01792019016base->base( )..\base.php:12 50.01792019016base->init_db( )..\base.php:18 60.01882086184require_once( 'E:\website\eurobeadszone\lib\db\db.class.php' )..\base.php:23

在网上也搜寻了不少方法:

说是类似下面的修改

 

include 'blogsql.class.php'; 改成

 

include_once 'blogsql.class.php';

但是改后也不对!

求高手指点!

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn