• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[RESOLVED] Fatal error: Cannot redeclare class

#1
[eluser]IamPrototype[/eluser]
Hey, I get this error
Code:
Fatal error: Cannot redeclare class Community in D:\Programmer\xampp\htdocs\community\application\libraries\Community.php on line 13

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

    /**
     * Community Library
     *
     * @author        Martin Nielsen
     * @version        1.0.0
     * @license        Copyright (c) 2009 Martin Nielsen
     */

    class Community {
        
        function Community()
        {
            $this->ci =& get_instance();
    
            log_message('debug', 'Community Initialized');
                
            // and so on with my code...
    }

    }

?>

Do you know why?

#2
[eluser]IamPrototype[/eluser]
Re-named my library... but now I get this error

Code:
Fatal error: Call to undefined method Community::load() in D:\Programmer\xampp\htdocs\community\application\libraries\Martin.php on line 29

Line #29 is
Code:
$this->ci->load('community');

Edit: I got it working! I forgot lang->load Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.