php - Moodle download a created PDF -
i create pdf in moodle using following code
$pdf = new pdf; $pdf->addpage(); $pdf->write(1, "test"); $pdf->output();
how make download in browser instead of opening in browser?
// force browser download output $pdf->output('filename.pdf','d');
Comments
Post a Comment