Hello ;
I would like to test Xajax in codeigniter and I see that !!
first when I download xajax.zip the last version there are a lot of folder and may be we need
xajax_core and xajax_js
so at the first , I try to proceed like as tutorial :
I copy xajax_core folder in application -> libraries
after I create js folder and make xajax_js under so : js /xajax_js
I don’t proceed the 6th step about mod_rewrite because this is optional :
so when I test this code :
<?php
class Testxajax extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->library('xajax');
$this->xajax->registerFunction(array('test_function',&$this,'test_function'));
$this->xajax->processRequest();
}
public function test_function($number) {
$objResponse=new xajaxResponse();
$objResponse->assign("someElementId", "innerHTML", "Xajax is working.letts add".($number+3));
return $objResponse;
}
public function index()
{
$template['xajax_js']= $this->xajax->getJavascript(null,'js/xajax.js');
$template['content']='<div id="someElementId"></div><input type="button" value="test">';
$this->load->view('template/index',$template);
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
?>
the xajax.js is xajax.core in js folder and an copy that in js folder in my project
so when I test it i have a message like this :
An Error Was Encountered
Unable to load the requested class: xajax
so when I see this message I try another method :
I copy xajax.inc of xajax.core and rename it xajax.php and make that in system->libraries
but when I try mabe it can load the librarie xajax but another error appears :
A PHP Error was encountered
Severity: 8192
Message: Assigning the return value of new by reference is deprecated
Filename: libraries/xajax.php
Line Number: 360
A PHP Error was encounteredSeverity: 8192
Message: Assigning the return value of new by reference is deprecated
Filename: libraries/xajax.php
Line Number: 1305
A PHP Error was encounteredSeverity: Warning
Message: require(C:\wamp\www\CodeIgniteLien\system\libraries/xajaxPluginManager.inc.php) [function.require]: failed to open stream: No such file or directory
Filename: libraries/xajax.php
Line Number: 257
( ! ) Fatal error: require() [function.require]: Failed opening required ‘C:\wamp\www\CodeIgniteLien\system\libraries/xajaxPluginManager.inc.php’ (include_path=’.;C:\\\\php\\\\pear’) in C:\wamp\www\CodeIgniteLien\system\libraries\xajax.php on line 257
did you have an idea ???
and another question : when I dowload xajax what are the files that we must copy and must use because there are a lot of files !!
thanks
