We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 720b488 commit e4a8675Copy full SHA for e4a8675
1 file changed
src/App.php
@@ -48,6 +48,17 @@ public static function send_response(
48
return exit($response);
49
}
50
51
+ public static function send_file($filename)
52
+ {
53
+ header('Content-Type: application/octet-stream');
54
+ header('Content-Disposition: attachment; filename="' . basename($filename) . '"');
55
+ header('Expires: 0');
56
+ header('Cache-Control: must-revalidate');
57
+ header('Pragma: public');
58
+ header('Content-Length: ' . filesize($filename));
59
+ readfile($filename);
60
+ }
61
+
62
public static function set_csrf()
63
{
64
session_start();
0 commit comments