public static function sendDownloadDialog($fileOrString, $fileName, $exit = true)
    {
        $disposition = (false !== strpos(self::$userAgent, 'MSIE 5.5')) ? '' : 'attachment; ';

        header("Pragma: public");
        header("Expires: 0");
        header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
        header("Cache-Control: private", false);
        header("Content-Disposition: " . $disposition . "filename=" . $fileName . ";");

        if (is_file($fileOrString)) {
            readfile($fileOrString);
        } else {
            echo $fileOrString;
        }

        if ($exit) {
            exit(0);
        }
    }