sigil88
10/11/2017 - 8:40 PM

https://stackoverflow.com/questions/37586939/how-to-send-ajax-request-to-codeigniter-library-file-or-class

URL needs to be:
* url: '<?php echo base_url('My_commonlib/getcountry');?>',


First of you need to set your base url in config.php $config['base_url'] = 'http://localhost/projectname/'; not good idea url: 'http://[::1]/school/???????' use like url: "<?php echo base_url('controller/function');?>"