Created
January 30, 2013 12:32
-
-
Save Abban/4672981 to your computer and use it in GitHub Desktop.
CodeIgniter function that catches if the current request is an Ajax one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Is Ajax | |
| * | |
| * Returns true or false depending on if the http request was an ajax one or not. | |
| * | |
| * @return boolean | |
| */ | |
| if(!function_exists('is_ajax')){ | |
| function is_ajax(){ | |
| $ci =& get_instance(); | |
| return $ci->input->is_ajax_request(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment