- Where Developers Learn, Share, & Build Careers


What can I tell when Ajax hates if CIS profiler is enabled because it is in view Injects html at the end of the method. Which corrupts with success: callback $ Ajax () .

Instead of defining my idea, $ 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:

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.

  Expands class MY_Controller CI_Controller {function __construct () {parent :: __ construct (); If (isset ($ _ POST ['is_ajax_request']) $ this-> Output-> Enable_profiler (wrong);}}   

Send a field when sending an AJAX request I_ajax_request To disable the profiler.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -