mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
找到问题,待解决
This commit is contained in:
@@ -251,6 +251,12 @@ class plugins_api:
|
||||
return public.returnJson(True, '安装成功!')
|
||||
public.execShell("rm -rf " + plugin_path)
|
||||
return public.returnJson(False, '安装失败!')
|
||||
|
||||
def phpinfoApi(self):
|
||||
version = request.form.get('version', '')
|
||||
phpinfo = public.httpGet(
|
||||
'http://127.0.0.1/' + version + '/phpinfo.php')
|
||||
return phpinfo
|
||||
##### ----- end ----- ###
|
||||
|
||||
# 进程是否存在
|
||||
|
||||
@@ -355,13 +355,16 @@ def HttpGet(url, timeout=10):
|
||||
|
||||
|
||||
def HttpGet2(url, timeout):
|
||||
import urllib
|
||||
import urllib2
|
||||
|
||||
req = urllib2.Request(url)
|
||||
res = urllib2.urlopen(req, timeout=timeout)
|
||||
result = res.read()
|
||||
return result
|
||||
try:
|
||||
req = urllib2.Request(url)
|
||||
res = urllib2.urlopen(req, timeout=timeout)
|
||||
result = res.read()
|
||||
return result
|
||||
|
||||
except Exception as e:
|
||||
return str(e)
|
||||
|
||||
|
||||
def httpGet(url, timeout=10):
|
||||
|
||||
@@ -611,7 +611,7 @@ class site_api:
|
||||
|
||||
# print home_cert
|
||||
cmd = 'export ACCOUNT_EMAIL=' + email + ' && ' + execStr
|
||||
print cmd
|
||||
# print cmd
|
||||
result = public.execShell(cmd)
|
||||
|
||||
if not os.path.exists(home_cert.replace("\*", "*")):
|
||||
|
||||
Reference in New Issue
Block a user