-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathshowimage.php
46 lines (43 loc) · 911 Bytes
/
showimage.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
include_once 'phppagestart.php';
$ext = strtolower(pathinfo($image, PATHINFO_EXTENSION));
if ($ext=='jpg')
{
$mimeext='jpeg';
}
elseif ($ext=='tif')
{
$mimeext='tiff';
}
else
{
$mimeext=$ext;
}
header("Content-type:image/$mimeext");
$image=$_GET['image'];
$pathimage=$_SESSION['userpath'].$_GET['image'];
header('Content-disposition: inline; filename="'.$image.'"');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
//Scan20190318010759.jpg
@readfile($pathimage);
//@readfile("/home/kodi/Pictures/scans/Scan20190318010759.jpg");
/*
if ($ext=='jpg')
{
$mimeext='jpeg';
}
else
{
$mimeext=$ext;
}
*/
//header('Content-type: application/jpg');
//$file=$_SESSION[''].$_GET['image'];
//$filename=$_GET['image'];
//$basename = pathinfo($image, PATHINFO_FILENAME);
// $basename= substr($image, 0, -4);
//echo $_SESSION['loggedin'];
//error_reporting(1);
//error_reporting('On');
?>