From 19efde1fdac6c0a5bea66df636a213043c53081e Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sat, 4 Jan 2025 13:00:43 +0800 Subject: [PATCH] update --- plugins/php-apt/conf/app_start.php | 56 +++++++++++++++--------------- plugins/php-yum/conf/app_start.php | 56 +++++++++++++++--------------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/plugins/php-apt/conf/app_start.php b/plugins/php-apt/conf/app_start.php index 8a21a7cd4..5bff93d38 100644 --- a/plugins/php-apt/conf/app_start.php +++ b/plugins/php-apt/conf/app_start.php @@ -1,7 +1,7 @@ save_run($xhprof_data, 'xhprof_foo'); + $run_id = $xhprof_runs->save_run($xhprof_data, 'xhprof_foo'); - $profiler_url = sprintf('http://{$LOCAL_IP}:5858/index.php?run=%s&source=xhprof_foo', $run_id); - echo ""; - // echo 'Profiler output'; + $profiler_url = sprintf('http://{$LOCAL_IP}: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; + && isset($_GET[XHProf_Name]) && $_GET[XHProf_Name] == 'ok' && + (! in_array($_SERVER['SCRIPT_NAME'], ['/xhprof_html/callgraph.php', + '/xhprof_html/index.php']))) { + app_xhprof_start(); + include_once $_SERVER['SCRIPT_FILENAME']; + app_xhprof_end(); + exit; } ?> diff --git a/plugins/php-yum/conf/app_start.php b/plugins/php-yum/conf/app_start.php index 8a21a7cd4..5bff93d38 100644 --- a/plugins/php-yum/conf/app_start.php +++ b/plugins/php-yum/conf/app_start.php @@ -1,7 +1,7 @@ save_run($xhprof_data, 'xhprof_foo'); + $run_id = $xhprof_runs->save_run($xhprof_data, 'xhprof_foo'); - $profiler_url = sprintf('http://{$LOCAL_IP}:5858/index.php?run=%s&source=xhprof_foo', $run_id); - echo ""; - // echo 'Profiler output'; + $profiler_url = sprintf('http://{$LOCAL_IP}: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; + && isset($_GET[XHProf_Name]) && $_GET[XHProf_Name] == 'ok' && + (! in_array($_SERVER['SCRIPT_NAME'], ['/xhprof_html/callgraph.php', + '/xhprof_html/index.php']))) { + app_xhprof_start(); + include_once $_SERVER['SCRIPT_FILENAME']; + app_xhprof_end(); + exit; } ?>