From feaf66c3bd22ca5d6cc7efbaa9cc60a13b9459e5 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 1 Aug 2005 03:29:06 +0000 Subject: [PATCH] Added exit parameter to download_file() --- functions.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index a3919bd..2ce67ae 100644 --- a/functions.php +++ b/functions.php @@ -112,8 +112,9 @@ class Functions * * @param str The text of the file to be streamed * @param str File name of the new file + * @param bool Whether or not to die after streaming the file */ - function download_file($file, $name) + function download_file($file, $name, $exit = true) { if ($this->is_browser('ie') OR $this->is_browser('opera') OR $this->is_browser('safari')) { @@ -132,7 +133,11 @@ class Functions header('Pragma: public'); print($file); - exit; + + if ($exit) + { + exit; + } } /** -- 2.43.5