I encountered a problem, I am developing a website with php
, I used to work on the nginx, where I can tell an ajax request by the $_SERVER['HTTP_X_REQUESTED_WITH']
constant.
Recently I switched to apache2.4
, here I encountered an embarrassing problem, $_SERVER['HTTP_X_REQUESTED_WITH']
constant is missing, after googling I know I can tell an ajax get
request by the function apache_request_headers()
, however it does not work on the ajax post
request.
Can someone help me? Thanks a lot