Detecting ajax request with PHP on Lighttpd a web server

Sxzwebtrpafyq

New Member
I'm having some trouble with detecting a jQuery ajax request with PHP on a \[code\]Lighttpd\[/code\] web server. Here's the following code (works fine on MAMP and Apache):\[code\]if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { // ajax (not recognized on lighttpd server) echo json_encode(array('success'=>1)); } else { // not ajax }\[/code\]I thought perhaps there's a certain lighttpd config that's not set correctly, but didn't see anything I recognized. Anyone have any experience with an issue like this?Thanks!
 
Back
Top