Top Menu
function admin_downloadForms($filename=null) {
        //echo $filename=base64_decode($filename);
      
     $filename = WWW_ROOT . “uploads/uploadform/”.$filename;
                if (file_exists($filename)) {
                header(“Pragma: public”);
                header(“Expires: 0”);
                header(“Cache-Control: must-revalidate, post-check=0, pre-check=0”);
                header(“Cache-Control: private”, false);
                header(“Content-Type: application/force-download”);
                header(“Content-Type: application/pdf”);
                header(“Content-Description: File Transfer”);
                header(“Content-Disposition: attachment; filename=” . basename($filename) . “;”);
                header(“Content-Transfer-Encoding: binary”);
                header(“Content-Length: ” . filesize($filename));
                readfile($filename) or die(‘Errors’);
                exit(0);
                }
                $this->autoRender=false;
    }

About The Author

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Close