回答編集履歴
1
修正
answer
CHANGED
|
@@ -11,12 +11,11 @@
|
|
|
11
11
|
$mime = finfo_file($fileinfo, $filepath);
|
|
12
12
|
if (in_array($mime, $mimelist, true)) {
|
|
13
13
|
$image = file_get_contents($filepath);
|
|
14
|
-
return "data:
|
|
14
|
+
return "data:" . $mime . ";base64," . base64_encode($image);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
return false;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
19
|
?>
|
|
21
20
|
<!DOCTYPE html>
|
|
22
21
|
<html lang="ja">
|