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