php - How To Make CodeIgniter's profiler and ajax requests play nice -
What can I tell when Ajax hates if CIS profiler is enabled because it is in Instead of defining my idea, I can add the following code, which can be disabled by the CI to the profiler if it is enabled only for AJAX requests Areas will be effective globally. If the course is a better solution, let me know but Google does not tell anything. Please expand the main controller and construct a particular post for the variable name in the constructor's check in the array and Disable profiler. Send a field when sending an AJAX request I_ajax_request To disable the profiler. view Injects html at the end of the method. Which corrupts with
success: callback
$ Ajax () .
$ this-> Output-> Enabled_profileor (wrong); On all the methods used for AJAX calls, I can use the following code in a hook or core controller which extends the CI_Controller .. or elsewhere, not to make sure where it is placed Go.
& lt ;? Php if ($ this-> Input-> is_ajax_request ()) {$ this- & gt; Output->; Enable_profiler (wrong); }
Question:
Expands class MY_Controller CI_Controller {function __construct () {parent :: __ construct (); If (isset ($ _ POST ['is_ajax_request']) $ this-> Output-> Enable_profiler (wrong);}}
Comments
Post a Comment