找到问题,待解决

This commit is contained in:
Mr Chen
2019-03-04 19:45:06 +08:00
parent 99f06f9c47
commit b414ce369f
6 changed files with 44 additions and 19 deletions
+6
View File
@@ -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 ----- ###
# 进程是否存在
+8 -5
View File
@@ -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):
+1 -1
View File
@@ -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("\*", "*")):