From 1e449189d5559af8a2cd891950b8e034b7e4a1bc Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 12 Jul 2020 18:15:03 +0800 Subject: [PATCH] Create app_start.php --- plugins/php/conf/app_start.php | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 plugins/php/conf/app_start.php diff --git a/plugins/php/conf/app_start.php b/plugins/php/conf/app_start.php new file mode 100644 index 000000000..eb5c2c8e2 --- /dev/null +++ b/plugins/php/conf/app_start.php @@ -0,0 +1,49 @@ +save_run($xhprof_data, 'xhprof_foo'); + + $profiler_url = sprintf('http://0.0.0.0:5858/index.php?run=%s&source=xhprof_foo', $run_id); + echo ""; + // echo 'Profiler output'; + +} + +if (extension_loaded('xhprof') + && isset($_GET[XHProf_Name]) && $_GET[XHProf_Name] == 'ok' && + (!in_array($_SERVER['SCRIPT_NAME'], array('/xhprof_html/callgraph.php', + '/xhprof_html/index.php')))) { + app_xhprof_start(); + include_once $_SERVER['SCRIPT_FILENAME']; + app_xhprof_end(); + exit; +} + +?>