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; }