From cd67c3bc8b9e2ac4716bc9b5f35dc31c48618836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E8=90=BD?= Date: Wed, 12 Feb 2020 01:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E7=BC=A9=E7=95=A5=E5=9B=BE=E6=96=B9?= =?UTF-8?q?=E6=A1=88=E7=95=A5=E4=BD=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/aq_resizer.php | 4 ++-- class/class_load.php | 2 ++ functions/Common.php | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/class/aq_resizer.php b/class/aq_resizer.php index 8521360..3784866 100644 --- a/class/aq_resizer.php +++ b/class/aq_resizer.php @@ -97,7 +97,7 @@ if(!class_exists('Aq_Resize')) { // Check if $img_url is local. if ( false === strpos( $url, $upload_url ) ) - throw new Aq_Exception('Image must be local: ' . $url); + throw new Aq_Exception('图片必须是本地图片: ' . $url); // Define path of image. $rel_path = str_replace( $upload_url, '', $url ); @@ -105,7 +105,7 @@ if(!class_exists('Aq_Resize')) { // Check if img path exists, and is an image indeed. if ( ! file_exists( $img_path ) or ! getimagesize( $img_path ) ) - throw new Aq_Exception('Image file does not exist (or is not an image): ' . $img_path); + throw new Aq_Exception('图片不存在或者不是一个图片文件: ' . $img_path); // Get image info. $info = pathinfo( $img_path ); diff --git a/class/class_load.php b/class/class_load.php index 697c130..29b21af 100644 --- a/class/class_load.php +++ b/class/class_load.php @@ -8,3 +8,5 @@ include( 'updates.php' );//在线更新 include( 'Payjs.php' );//支付功能 include( 'points/points.php' );//积分功能 + +include( 'aq_resizer.php' );//缩略图功能 \ No newline at end of file diff --git a/functions/Common.php b/functions/Common.php index 1fd04d5..9455188 100644 --- a/functions/Common.php +++ b/functions/Common.php @@ -944,10 +944,10 @@ function gdk_thumbnail_src() { $gdk_thumbnail_src = $matches[1][0]; //获取该图片 src if (empty($gdk_thumbnail_src)) { //如果日志中没有图片,则显示随机图片 $random = mt_rand(1, 12); - echo GDK_BASE_URL.'assets/img/thumb/' . $random . '.jpg'; + $gdk_thumbnail_src = GDK_BASE_URL.'assets/img/thumb/' . $random . '.jpg'; } }; - echo $gdk_thumbnail_src; + return $gdk_thumbnail_src; }