forked from qo-op/G1BILLET
dirname(__FILE__)."/tmp/g1billet/".
This commit is contained in:
parent
35f933d208
commit
6ec561c296
|
@ -10,7 +10,7 @@ if ( $_REQUEST['style'] == 'ticket' || $_REQUEST['style'] == 'xbian' || $_REQUES
|
||||||
} else {
|
} else {
|
||||||
$file_type = "pdf";
|
$file_type = "pdf";
|
||||||
}
|
}
|
||||||
$attachment_location = "/tmp/g1billet/".$timestamp.".".$file_type;
|
$attachment_location = dirname(__FILE__)."/tmp/g1billet/".$timestamp.".".$file_type;
|
||||||
|
|
||||||
if (file_exists($attachment_location)) {
|
if (file_exists($attachment_location)) {
|
||||||
header($_SERVER["SERVER_PROTOCOL"] . " 200 OK");
|
header($_SERVER["SERVER_PROTOCOL"] . " 200 OK");
|
||||||
|
@ -20,7 +20,7 @@ if (file_exists($attachment_location)) {
|
||||||
header("Content-Length:".filesize($attachment_location));
|
header("Content-Length:".filesize($attachment_location));
|
||||||
header("Content-Disposition: attachment; filename=".$timestamp.".".$file_type);
|
header("Content-Disposition: attachment; filename=".$timestamp.".".$file_type);
|
||||||
readfile($attachment_location);
|
readfile($attachment_location);
|
||||||
unlink("/tmp/g1billet/".$timestamp.".".$file_type);
|
unlink(dirname(__FILE__)."/tmp/g1billet/".$timestamp.".".$file_type);
|
||||||
die();
|
die();
|
||||||
} else {
|
} else {
|
||||||
die("Error: File not found.");
|
die("Error: File not found.");
|
||||||
|
|
Loading…
Reference in New Issue