Hello everyone,
I am new to codeigniter and so far i am really excited about it. I have run into some problems and i need some help..
I have created a custom core controller in the folder application/core which i would like to use for system wide variables and methods in my application. I did this by following the guide Creating Core System Classes
Here is my code:
class OBJ_System extends CI_Controller {
public function __construct() {
parent::__construct();
....
}
public function index(){
//....
}
public function do_something() {
.....
echo "i did it";
}
}whenever i try from one of my view to post something to the method do_something() of my core controller
$.post( "OBJ_System/do_something/", {"params": 'do_this'}, function( data ) {
});i get the following
404 Page Not Found The page you requested was not found.
can anyone help me with this? How can i post data to my core controller?
ps. I have tried a different approach. I created a controller called System, withing my application/controllers folder. Whenever i post something to this controller
$.post( "system/do_something/", {"params": 'do_this'}, function( data ) {
});i get a 403 Forbidden response.. this happens because of the .htaccess file in the system folder. How would you solve this issue?
Thank you in advance..!!!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.