Why doesn’t var_dump work here, the ajax call is successful, but there is nothing printed, not even a string literal print from the PHP.
My controller
function check_links() {
$matches = $this->input->get('matchesJSON');
var_dump($matches);
//$this->load->view('publish_links_view');
}
Ajax call
$.ajax({
type: 'GET',
dataType: 'json',
cache: false,
data: 'matchesJSON='+matchesJSON,
url: 'publishlinks/check_links',
success:
function(response) {
}
})
I assume you’re expecting it to var_dump to the browser.
Ajax happens “behind the scenes”, so it wouldn’t output to your browser, you’d have it in your
successhandler’sresponseargument.if you want to test it just hit the url directly with your browser.
Also, you can monitor all of your AJAX requests / responses with the Browser extension Firebug, very useful in situations like this.