header.php 773 B

12345678910111213141516171819202122
  1. <?php
  2. /* For license terms, see /license.txt */
  3. /**
  4. * @package chamilo.profiling
  5. */
  6. /**
  7. * Init. Xhprof has been replaced by The Tideways profiler as Xhprof is not
  8. * maintained for PHP anymore (Facebook moved to HHVM).
  9. * See https://tideways.io/profiler/
  10. * To use, you should load header.php and footer.php through an append_file
  11. * in your php config also disable the .htaccess line about the tests/
  12. * directory.
  13. */
  14. $isAjaxRequest = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest';
  15. if (extension_loaded('tideways') && !$isAjaxRequest) {
  16. //include_once __DIR__.'/xhprof_lib/utils/xhprof_lib.php';
  17. //include_once __DIR__.'/xhprof_lib/utils/xhprof_runs.php';
  18. tideways_enable(TIDEWAYS_FLAGS_NO_SPANS);
  19. }