ankur0101 Posted April 11, 2013 Share Posted April 11, 2013 Hi, I have a code which detects whether it is an ajax request or any guest is directly visiting URL. I am using following code for building ajax request. xmlhttp.open("GET","http://aims.cmcs/ajax/fetch_fees_structure/"+dept.value+"/"+str,true); xmlhttp.setRequestHeader('X_Requested_With', 'XMLHttpRequest'); xmlhttp.send(); It works perfectly (on localhost) as, 1. While user is working in app, he get those all ajax things. 2. But when any guest goes to http://aims.cmcs/ajax/fetch_fees_structure/MS, it shows error which I have defined. But when I put this on cPanel server, it shows error while accessing in my app 1. user using app get that error which a guest would see while directly opening URL. I am using Codeigniter. CI got inbuilt ready function for that. Problem is things are not working on cPanel server and working on my localhost. I am confused as I think there is not need to tweak PHP or any other server settings as this is client side thing. Please help me. Thanks. Link to comment https://forums.phpfreaks.com/topic/276824-ajax-request-not-detecting-on-cpanel-server/ Share on other sites More sharing options...
ankur0101 Posted May 4, 2013 Author Share Posted May 4, 2013 Bump......anybody here ? Link to comment https://forums.phpfreaks.com/topic/276824-ajax-request-not-detecting-on-cpanel-server/#findComment-1428124 Share on other sites More sharing options...
trq Posted May 4, 2013 Share Posted May 4, 2013 Firstly, cPanel is NOT a server. Secondly, you have shown us nothing describing your actual error. Link to comment https://forums.phpfreaks.com/topic/276824-ajax-request-not-detecting-on-cpanel-server/#findComment-1428131 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.