moonsflyer 4 ヶ月 前
コミット
a9690e5a21
1 ファイル変更3 行追加2 行削除
  1. 3 2
      app/common/service/ImageCompressService.php

+ 3 - 2
app/common/service/ImageCompressService.php

@@ -104,18 +104,19 @@ class ImageCompressService
         if (!file_exists($path)) {
         if (!file_exists($path)) {
             throw new Exception('图片文件不存在: ' . $path);
             throw new Exception('图片文件不存在: ' . $path);
         }
         }
-
+        outFileLog(file_exists($path),'upload_img','createImageFromType-$path1');
         // 检查文件是否可读
         // 检查文件是否可读
         if (!is_readable($path)) {
         if (!is_readable($path)) {
             throw new Exception('图片文件无法读取: ' . $path);
             throw new Exception('图片文件无法读取: ' . $path);
         }
         }
-
+        outFileLog(is_readable($path),'upload_img','createImageFromType-$path2');
         // 检查GD扩展
         // 检查GD扩展
         if (!extension_loaded('gd')) {
         if (!extension_loaded('gd')) {
             throw new Exception('GD扩展未安装');
             throw new Exception('GD扩展未安装');
         }
         }
         outFileLog(extension_loaded('gd'),'upload_img','createImageFromType-gd');
         outFileLog(extension_loaded('gd'),'upload_img','createImageFromType-gd');
         outFileLog($type,'upload_img','createImageFromType-$type');
         outFileLog($type,'upload_img','createImageFromType-$type');
+        outFileLog($path,'upload_img','createImageFromType-$path');
         try {
         try {
             switch ($type) {
             switch ($type) {
                 case IMAGETYPE_JPEG:
                 case IMAGETYPE_JPEG: