diff --git a/extend/base/Uploader.php b/extend/base/Uploader.php index 7a4c15dbae5977980a83e06d3aae4b2ae618258f..b2b3acc20e93b36f1d5119811660282b6373cb68 100755 --- a/extend/base/Uploader.php +++ b/extend/base/Uploader.php @@ -349,6 +349,12 @@ class Uploader $imgUrl = htmlspecialchars($this->fileField); $imgUrl = str_replace("&", "&", $imgUrl); + //检查是否不允许的文件格式 + if (!$this->checkType()) { + $this->stateInfo = $this->getStateInfo("ERROR_TYPE_NOT_ALLOWED"); + return; + } + //http开头验证 if (strpos($imgUrl, "http") !== 0) { $this->stateInfo = $this->getStateInfo("ERROR_HTTP_LINK");