pull/678/head
Mr Chen 4 months ago
parent f6b61c935e
commit 76cf2e8fa5
  1. 2
      plugins/phpmyadmin/index.py
  2. 9
      plugins/tamper_proof_py/index.py
  3. 3
      plugins/xhprof/index.py

@ -90,7 +90,7 @@ def getHomePage():
def getPhpVer(expect=55):
php_vers = MwSites.instance().getPhpVersion()
v = php_ver[0]
v = php_ver['data']
is_find = False
for i in range(len(v)):
t = str(v[i]['version'])

@ -16,6 +16,7 @@ if os.path.exists(web_dir):
os.chdir(web_dir)
import core.mw as mw
from utils.site import sites as MwSites
app_debug = False
if mw.isAppleSystem():
@ -560,12 +561,12 @@ class App:
return mw.returnJson(False, "此目录不存在")
# 判断是否安装php
import site_api
php_version = site_api.site_api().getPhpVersion()
if not php_version:
php_version = MwSites.instance().getPhpVersion()
if not php_version['data']:
return mw.returnJson(False, "未安装PHP测试失败")
php_path = '/www/server/php/' + php_version[1]['version'] + '/bin/php'
php_path = '/www/server/php/' + php_version['data'][1]['version'] + '/bin/php'
php_name = path + "/" + str(int(time.time())) + ".php"
if os.path.exists(php_name):
mw.execShell("rm -rf %s" % php_name)

@ -74,7 +74,8 @@ def getHomePage():
def getPhpVer(expect=74):
v = MwSites.instance().getPhpVersion()
php_vers = MwSites.instance().getPhpVersion()
v = php_ver['data']
for i in range(len(v)):
t = int(v[i]['version'])
if (t >= expect):

Loading…
Cancel
Save