Welcome Guest, Not a member yet? Register   Sign In
is_ajax_request does not recognized XMLHttpRequest
#4

(10-04-2018, 10:02 AM)InsiteFX Wrote: You can try this and see what you get this is the old way that we use to do it.

[code]define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');

The above (more or less) what CI_Input does

From /system/core/Input.php
PHP Code:
   public function is_ajax_request()
 
   {
 
      return ( ! empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest');
 
   

I think there is something in the JavaScript that is producing a non-standard XMLHttpRequest.
Reply


Messages In This Thread
RE: is_ajax_request does not recognized XMLHttpRequest - by dave friend - 10-04-2018, 09:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB