pull/637/head
Mr Chen 5 months ago
parent 85afff4848
commit 9d77f66e47
  1. 4
      plugins/php/conf/app_start.php
  2. 17
      plugins/xhprof/index.py

@ -1,7 +1,9 @@
<?php
if (isset($_GET['mw_opcache_reset']) && $_GET['mw_opcache_reset'] == 'ok') {
opcache_reset();
if (function_exists('opcache_reset')) {
opcache_reset();
}
}
define('XHProf_Name', 'mdd');

@ -118,6 +118,18 @@ def status():
return 'start'
return 'stop'
def getConfAppStart():
pstart = mw.getServerDir() + '/php/app_start.php'
return pstart
def phpPrependFile(version):
app_start = getConfAppStart()
if not os.path.exists(app_start):
tpl = mw.getPluginDir() + '/php/conf/app_start.php'
content = mw.readFile(tpl)
content = contentReplace(content, version)
mw.writeFile(app_start, content)
def start():
file_tpl = getPluginDir() + '/conf/xhprof.conf'
@ -203,11 +215,6 @@ def setXhPort():
return mw.returnJson(True, '修改成功!')
def getConfAppStart():
pstart = mw.getServerDir() + '/php/app_start.php'
return pstart
def installPreInspection():
path = mw.getServerDir() + '/php'
if not os.path.exists(path):

Loading…
Cancel
Save