Exemplo n.º 1
0
        $ext = '.' . str_replace(".", "", strrchr($array['img'], '.'));
        $titrefile = fl($array['titre']) . $ext;
        $download_path = "upload/doc/";
        $args = array('download_path' => $download_path, 'file' => $file, 'extension_check' => FALSE, 'referrer_check' => FALSE, 'referrer' => NULL);
        $download = new download($args);
        /*
        |-----------------
        | Pre Download Hook
        |------------------
        */
        $download_hook = $download->get_download_hook();
        //$download->chip_print($download_hook);
        //exit;
        /*
        |-----------------
        | Download
        |------------------
        */
        if ($download_hook['download'] == TRUE) {
            /* You can write your logic before proceeding to download */
            /* Let's download file */
            $download->get_download($titrefile);
        }
    } else {
        $msg = "Le fichier demandé n'est plus disponible.";
        msgbox($msg, 0, './docx.html', 6);
    }
} else {
    $msg = "Le fichier demandé n'est plus disponible.";
    msgbox($msg, 0, './docx.html', 6);
}