Loading…

How to check an Ajax request on the server?

Checking an Ajax request on the server is a task which can be done with the help of input class method. If there has been an Ajax request on the server, then the function, Input::is_ajax will return true, and in the otherwise case, it will return false.

Example

                                        

if (Input::is_ajax()) {
    // Ajax request
} else {
    // Normal request
}

Suggest An Answer

No suggestions avaliable!

Latest post from FuelPHP Interview Questions

Ask Question