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 {
|
||||
$file_type = "pdf";
|
||||
}
|
||||
$attachment_location = "/tmp/g1billet/".$timestamp.".".$file_type;
|
||||
$attachment_location = dirname(__FILE__)."/tmp/g1billet/".$timestamp.".".$file_type;
|
||||
|
||||
if (file_exists($attachment_location)) {
|
||||
header($_SERVER["SERVER_PROTOCOL"] . " 200 OK");
|
||||
|
@ -20,7 +20,7 @@ if (file_exists($attachment_location)) {
|
|||
header("Content-Length:".filesize($attachment_location));
|
||||
header("Content-Disposition: attachment; filename=".$timestamp.".".$file_type);
|
||||
readfile($attachment_location);
|
||||
unlink("/tmp/g1billet/".$timestamp.".".$file_type);
|
||||
unlink(dirname(__FILE__)."/tmp/g1billet/".$timestamp.".".$file_type);
|
||||
die();
|
||||
} else {
|
||||
die("Error: File not found.");
|
||||
|
|
Loading…
Reference in New Issue