Welcome Guest, Not a member yet? Register   Sign In
Config xajax in codeigniter
#1

[eluser]Unknown[/eluser]
Hi all!
To day, I config xajax in codeigniter.But have error below.
Fatal error: Cannot redeclare class xajaxRequestPlugin in D:\AppServ\www\football_1\system\application\libraries\xajaxPlugin.inc.php on line 102
Now who understand problem.Please help me. Thanks
#2

[eluser]pickupman[/eluser]
A redeclare error means you have two classes with the same name. Example
Code:
class xajax{

//Some class methods stuff here
}

//Later in code somewhere either in same file or in another file
class xajax{ //This duplicate is be declared again at line 102

}

If you care trying to create a library from a 3rd party class, just open the php class file and rename the class to Xajax. CI libraries have the first letter capitalized, and the rest lowercase. Then you can use:

Code:
$this->load->library('xajax');
$this->xajax->some_method(); //use all lowercase to reference the class




Theme © iAndrew 2016 - Forum software by © MyBB