• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.