From b5b1f8d4183e6257d5d3e4aac74919cdb6a93583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=83=A1?= <3203164629@qq.com> Date: Thu, 11 Jan 2024 13:17:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=87=B3v1.87=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=86=85=E5=AE=B9=E5=9C=A8=E7=AC=94=E8=AE=B0?= =?UTF-8?q?=E4=B8=AD=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- avatar.php | 4 ++-- data/template/index.html | 0 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 data/template/index.html diff --git a/avatar.php b/avatar.php index 1365f61..08e04da 100644 --- a/avatar.php +++ b/avatar.php @@ -13,7 +13,7 @@ $uid = isset($_GET['uid']) ? $_GET['uid'] : 0; $size = isset($_GET['size']) ? $_GET['size'] : ''; $random = isset($_GET['random']) ? $_GET['random'] : ''; $type = isset($_GET['type']) ? $_GET['type'] : ''; -$check = $_GET['check_file_exists'] ?? ''; +$check = isset($_GET['check_file_exists']) ? $_GET['check_file_exists'] : ''; $avatar = './data/avatar/'.get_avatar($uid, $size, $type); if(file_exists(dirname(__FILE__).'/'.$avatar)) { @@ -41,7 +41,7 @@ if(empty($random)) { header('Location: '.SITEURL.'/'.$avatar_url); exit; -function get_avatar($uid, $size = 'middle', $type = ''): string +function get_avatar($uid, $size = 'middle', $type = '') { $size = in_array($size, array('big', 'middle', 'small')) ? $size : 'middle'; $uid = abs(intval($uid)); diff --git a/data/template/index.html b/data/template/index.html new file mode 100644 index 0000000..e69de29