File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -446,21 +446,23 @@ def setMaxTime(version):
446446
447447def setMaxSize (version ):
448448 args = getArgs ()
449- if not 'max' in args :
450- return 'missing time args!'
451- max = args ['max' ]
452- if int (max ) < 2 :
449+ data = checkArgs (args , ['max' ])
450+ if not data [0 ]:
451+ return data [1 ]
452+
453+ maxVal = args ['max' ]
454+ if int (maxVal ) < 2 :
453455 return mw .returnJson (False , '上传大小限制不能小于2MB!' )
454456
455457 path = getServerDir () + '/' + version + '/etc/php.ini'
456458 conf = mw .readFile (path )
457459 rep = u"\n upload_max_filesize\s*=\s*[0-9]+M"
458- conf = re .sub (rep , u'\n upload_max_filesize = ' + max + 'M' , conf )
460+ conf = re .sub (rep , u'\n upload_max_filesize = ' + maxVal + 'M' , conf )
459461 rep = u"\n post_max_size\s*=\s*[0-9]+M"
460- conf = re .sub (rep , u'\n post_max_size = ' + max + 'M' , conf )
462+ conf = re .sub (rep , u'\n post_max_size = ' + maxVal + 'M' , conf )
461463 mw .writeFile (path , conf )
462464
463- msg = mw .getInfo ('设置PHP-{1}最大上传大小为[{2}MB]!' , (version , max ,))
465+ msg = mw .getInfo ('设置PHP-{1}最大上传大小为[{2}MB]!' , (version , maxVal ,))
464466 mw .writeLog ('插件管理[PHP]' , msg )
465467 return mw .returnJson (True , '设置成功!' )
466468
Original file line number Diff line number Diff line change 22
33php_fpm_BIN=/www/server/php/52/bin/php-cgi
44php_fpm_CONF=/www/server/php/52/etc/php-fpm.conf
5- php_fpm_PID=/www/server/php/52/logs /php-fpm.pid
5+ php_fpm_PID=/www/server/php/52//var/log /php-fpm.pid
66
77
88php_opts=" --fpm-config $php_fpm_CONF "
You can’t perform that action at this time.
0 commit comments