diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index 098027f5f..a6b2b97a7 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -252,11 +252,26 @@ class plugins_api: public.execShell("rm -rf " + plugin_path) return public.returnJson(False, '安装失败!') + # 由于内容太大无法shell输出,暂时移动的插件模块中 def phpinfoApi(self): - version = request.form.get('version', '') - phpinfo = public.httpGet( - 'http://127.0.0.1/' + version + '/phpinfo.php') - return phpinfo + v = request.form.get('v', '') + sys.path.append("plugins/php") + + import index + content = index.getPhpinfo(v) + return content + + # self.checkPhpinfoFile(version) + # infoPath = public.getRootDir() + '/phpinfo' + # sPath = infoPath + '/' + version + + # public.execShell('rm -rf ' + infoPath) + # public.execShell('mkdir -p ' + sPath) + # public.writeFile(sPath + '/phpinfo.php', '') + # url = 'http://127.0.0.1/' + version + '/phpinfo.php' + # phpinfo = public.httpGet(url) + # os.system("rm -rf " + infoPath) + # return phpinfo ##### ----- end ----- ### # 进程是否存在 diff --git a/plugins/php/conf/php56.ini b/plugins/php/conf/php56.ini index 8e541fd62..a08f58d34 100644 --- a/plugins/php/conf/php56.ini +++ b/plugins/php/conf/php56.ini @@ -212,8 +212,3 @@ ldap.max_links = -1 [dba] [curl] [Zend Opcache] - -;[xhprof] -;extension=md_xhprof.so -;xhprof.output_dir="MD:/bin/tmp/xhprof" - diff --git a/plugins/php/index.py b/plugins/php/index.py index efeb31310..7e178f57d 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -484,8 +484,8 @@ def setDisableFunc(version): def checkPhpinfoFile(v): if public.isInstalledWeb(): - desc_file = public.getServerDir() + '/openresty/nginx/conf/php_status/phpinfo_' + \ - str(v) + '.conf' + desc_file = public.getServerDir( + ) + '/openresty/nginx/conf/php_status/phpinfo_' + v + '.conf' if not os.path.exists(desc_file): tpl = getPluginDir() + '/conf/phpinfo.conf' content = public.readFile(tpl) @@ -496,15 +496,14 @@ def checkPhpinfoFile(v): def getPhpinfo(v): checkPhpinfoFile(v) - sPath = public.getRootDir() + '/phpinfo/' + str(v) - # public.execShell("rm -rf " + public.getRootDir() + '/phpinfo') + sPath = public.getRootDir() + '/phpinfo/' + v + public.execShell("rm -rf " + public.getRootDir() + '/phpinfo') public.execShell("mkdir -p " + sPath) public.writeFile(sPath + '/phpinfo.php', '') - # print 'http://127.0.0.1/' + str(v) + '/phpinfo.php' - phpinfo = public.httpGet('http://127.0.0.1/' + str(v) + '/phpinfo.php') - public.writeFile('/tmp/phpinfo.txt', phpinfo) - # os.system("rm -rf " + public.getRootDir() + '/phpinfo') - return '' + url = 'http://127.0.0.1/' + v + '/phpinfo.php' + phpinfo = public.httpGet(url) + os.system("rm -rf " + public.getRootDir() + '/phpinfo') + return phpinfo def getLibConf(version): diff --git a/plugins/php/js/php.js b/plugins/php/js/php.js index 33d38a4da..04c634bac 100755 --- a/plugins/php/js/php.js +++ b/plugins/php/js/php.js @@ -378,7 +378,7 @@ function getPhpinfo(version) { } //获取PHPInfo -function getPHPInfo(version) { +function getPHPInfo_old(version) { phpPost('get_phpinfo', version, '', function(data){ var rdata = data.data; layer.open({ @@ -393,7 +393,7 @@ function getPHPInfo(version) { } //获取PHPInfo -function getPHPInfo_new(version) { +function getPHPInfo(version) { $.post('/plugins/phpinfo', {v:version}, function(data) { layer.open({ type: 1, diff --git a/route/static/app/site.js b/route/static/app/site.js index e34bbdfb8..73d1706a8 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -984,8 +984,7 @@ function setIndexList(id){ /*站点修改*/ function webEdit(id,website,endTime,addtime){ - var eMenu = ''; - eMenu = "
子目录绑定
" + var eMenu = "子目录绑定
" +"网站目录
" +"流量限制
" +"伪静态
" @@ -1187,55 +1186,55 @@ function limitNet(id){ +"" +"" +"