Fix relative path for Xhprof reporting link

1.9.x
Yannick Warnier 10 years ago
parent dd5aba4437
commit 4bc0810e2b
  1. 4
      tests/xhprof/footer.php

@ -10,8 +10,8 @@ if (extension_loaded('xhprof')) {
$xhprof_data = xhprof_disable();
$xhprof_runs = new XHProfRuns_Default();
$run_id = $xhprof_runs->save_run($xhprof_data, $profiler_namespace);
// url to the XHProf UI libraries (change the host name and path)
$profiler_url = sprintf('http://my.chamilo.net/tests/xhprof/xhprof_html/index.php?run=%s&source=%s', $run_id, $profiler_namespace);
$subDir = substr(__DIR__, strlen(trim($_SERVER['DOCUMENT_ROOT'])));
$profiler_url = sprintf($subDir.'/xhprof_html/index.php?run=%s&source=%s', $run_id, $profiler_namespace);
echo '<a href="'. $profiler_url .'" target="_blank">Profiler output</a>';
}

Loading…
Cancel
Save