|
@@ -176,6 +176,12 @@ class Core
|
|
if (($size < $this->data['file']['size']) && $size > 0) {
|
|
if (($size < $this->data['file']['size']) && $size > 0) {
|
|
$this->output['status'] = -1;
|
|
$this->output['status'] = -1;
|
|
$this->output['message'] = '文件不能超过'.(($size/1024)/1024).'MB';
|
|
$this->output['message'] = '文件不能超过'.(($size/1024)/1024).'MB';
|
|
|
|
+ } elseif ($this->limit && $this->config['setwh'] == 2 && $this->limit[0] < $this->limit[1]) {
|
|
|
|
+ $this->output['status'] = -1;
|
|
|
|
+ $this->output['message'] = '图片高度不能超过图片宽度';
|
|
|
|
+ } elseif ($this->limit && $this->config['setwh'] == 3 && $this->limit[0] > $this->limit[1]) {
|
|
|
|
+ $this->output['status'] = -1;
|
|
|
|
+ $this->output['message'] = '图片宽度不能超过图片高度';
|
|
} elseif ($this->limit && $this->config['width'] > 0 && $this->config['width'] < $this->limit[0]) {
|
|
} elseif ($this->limit && $this->config['width'] > 0 && $this->config['width'] < $this->limit[0]) {
|
|
$this->output['status'] = -1;
|
|
$this->output['status'] = -1;
|
|
$this->output['message'] = '图片宽度不能超过' . $this->config['width'] . 'px';
|
|
$this->output['message'] = '图片宽度不能超过' . $this->config['width'] . 'px';
|