CodeIgniter Forums
[RESOLVED] Fatal error: Cannot redeclare class - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: [RESOLVED] Fatal error: Cannot redeclare class (/showthread.php?tid=17013)



[RESOLVED] Fatal error: Cannot redeclare class - El Forum - 03-23-2009

[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?


[RESOLVED] Fatal error: Cannot redeclare class - El Forum - 03-23-2009

[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