stanley-king 8 年 前
コミット
76a18f2da6
1 ファイル変更5 行追加5 行削除
  1. 5 5
      core/framework/libraries/uploadfile.php

+ 5 - 5
core/framework/libraries/uploadfile.php

@@ -183,7 +183,7 @@ class UploadFile
 		}
 
 		//检查是否为有效图片
-		if(!$image_info = @getimagesize($this->upload_file['tmp_name'])) {
+		if(!$image_info = getimagesize($this->upload_file['tmp_name'])) {
 			$error = Language::get('upload_image_is_not_image');
 			$this->setError($error);
 			return false;
@@ -243,7 +243,7 @@ class UploadFile
 			die();
 		}
 		if ($this->error != '') return false;
-		if(@move_uploaded_file($this->upload_file['tmp_name'],BASE_UPLOAD_PATH.DS.$this->save_path.DS.$this->file_name)){
+		if(move_uploaded_file($this->upload_file['tmp_name'],BASE_UPLOAD_PATH.DS.$this->save_path.DS.$this->file_name)){
 			//产生缩略图
 			if ($ifresize){
 				$resizeImage	= new ResizeImage();
@@ -259,7 +259,7 @@ class UploadFile
 
 			//删除原图
 			if ($this->ifremove && is_file(BASE_UPLOAD_PATH.DS.$this->save_path.DS.$this->file_name)) {
-				@unlink(BASE_UPLOAD_PATH.DS.$this->save_path.DS.$this->file_name);
+				unlink(BASE_UPLOAD_PATH.DS.$this->save_path.DS.$this->file_name);
 			}
 			return true;
 		}else {
@@ -286,7 +286,7 @@ class UploadFile
 			$thumb_ext 		= explode(',',$this->thumb_ext);
 		 	if (count($thumb_width) == count($thumb_height) && count($thumb_height) == count($thumb_ext)) $ifresize = true;
 		}
-		$image_info = @getimagesize($pic_path);
+		$image_info = getimagesize($pic_path);
 		//计算缩略图的尺寸
 		if ($ifresize){
 			for ($i=0;$i<count($thumb_width);$i++){
@@ -387,7 +387,7 @@ class UploadFile
 			foreach ($dir_array as $k => $v){
 				$tmp_base_path = $tmp_base_path.DS.$v;
 				if(!is_dir($tmp_base_path)){
-					if (!@mkdir($tmp_base_path,0755,true)){
+					if (!mkdir($tmp_base_path,0755,true)){
 						$this->setError('创建目录失败,请检查是否有写入权限');
 						return false;
 					}