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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原創
2016-06-06 19:46:082041瀏覽

今天将本地的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';

但是改后也不对!

求高手指点!

 

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn