質問編集履歴
3
コメント追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
header("location:error.php?e=connect");
|
15
15
|
exit();
|
16
16
|
}
|
17
|
+
//拡張子を含まないファイル名で検索
|
17
18
|
$request_file=$mysqli->real_escape_string($file);
|
18
19
|
//ファイル名で検索
|
19
20
|
$query="SELECT * FROM file WHERE file = '" . $request_file . "'";
|
@@ -27,6 +28,7 @@
|
|
27
28
|
}
|
28
29
|
|
29
30
|
$row = $result->fetch_assoc();
|
31
|
+
//拡張子を含むファイル名取得
|
30
32
|
$file_name=$row["file_name"];
|
31
33
|
|
32
34
|
$path_parts = pathinfo($file_name);
|
2
コード変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -54,7 +54,7 @@
|
|
54
54
|
header('Content-Type: image/jpeg');
|
55
55
|
header('Content-Disposition: inline');
|
56
56
|
readfile($file_fullpath);
|
57
|
-
|
57
|
+
break;
|
58
58
|
|
59
59
|
case IMAGETYPE_PNG:
|
60
60
|
header('Content-Type: image/png');
|
1
修正
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|