I’m currently using this to check if the request is an ajax request:
if ( ! Request::$is_ajax || Request::instance() == $this->request)
{
exit;
}
If I try to access the page directly it’ll exit, but if I make an ajax request, it’ll also exit. I also tried just:
if ( ! Request::$is_ajax)
{
exit;
}
And vice versa, but the script still exits everytime. If I remove the check, the ajax works as normal. Any idea what could be wrong? Thanks.
Request::instance() ===is TRUE. Use this$this->request
condition for HMVC calls.
$_SERVER['HTTP_X_REQUESTED_WITH']condition is TRUE. Check your client headers== 'xmlhttprequest'
(with firebug for example), maybe
your JS doesnt send this header. Or,
may be you are using flash uploader?