Failed to load response data when a specific function is called
<p>I have a file called <code>api.php</code>, now inside of this I have a lot of <code>public</code> function. What I'm trying to achieve is call, from another file, a specific function of <code>API.php</code>. Essentially I perform the request, like this:</p>

<pre><code>var postUrl = GlobalVariables.baseUrl + 'application/controllers/api.php/ajax_change_language';
var postData = { 'language': $(this).attr('data-language') };

$.post(postUrl, postData, function(response)
{
   //some stuff...
}, 'json');
</code></pre>

<p>how you can see from my <code>postUrl</code> I want to call <code>ajax_change_language</code>, I have inserted this after the file to call in the url. 
The request is performed successfully but the function isn't executed, I tried to put a simply echo or a var_dump of <code>$_POST</code> but the function isn't called. What I did wrong?</p>