Initial commit,修正
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
# @Author: 嗨噜客(三亚) <fm453>
|
||||
# @Date: 2022-05-11T11:18:26+08:00
|
||||
# @Email: fm453@lukegzs.com
|
||||
# @Last modified by: fm453
|
||||
# @Last modified time: 2024-07-01T09:51:37+08:00
|
||||
# @Copyright: www.hiluker.cn
|
||||
|
||||
$i = $_GET['i'];
|
||||
$type = $_GET['t'];
|
||||
$filePath = $_SERVER['DOCUMENT_ROOT'].'/'.$i;
|
||||
echo '图片不存在';
|
||||
die();
|
||||
// 确保文件存在
|
||||
if (file_exists($filePath)) {
|
||||
// 发送图片的头信息
|
||||
header('Content-Type: image/jpeg');
|
||||
// 输出图片内容
|
||||
readfile($filePath);
|
||||
} else {
|
||||
// 图片不存在的处理逻辑
|
||||
echo '图片不存在';
|
||||
}
|
||||
Reference in New Issue
Block a user