自分のPDF出力をCodeIgniterフォルダの1つに保存する必要があります。将来のアクセスのためのフォルダにそれを表示し、保存する私のMPDF出力をcodeignitorのフォルダに保存するにはどうすればいいですか?
私のコントローラ私は必要
class Pdf extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->library('M_pdf');
}
public function index() {
//load view
$this->load->model("crud_model");
$data["fetch_data_seminar"] = $this->crud_model->fetch_data_seminar();
$data1["fetch_data_conf"] = $this->crud_model->fetch_data_conf();
$data2["fetch_data_extra"] = $this->crud_model->fetch_data_extra();
$data3["fetch_data_cgpa"] = $this->crud_model->fetch_data_cgpa();
$data4["fetch_data_representation"] = $this->crud_model->fetch_data_representation();
$data5["fetch_data_participation"] = $this->crud_model->fetch_data_participation();
$data6["fetch_data_organ"] = $this->crud_model->fetch_data_organ();
$data7["fetch_data_events"] = $this->crud_model->fetch_data_events();
$data8["fetch_data_program"] = $this->crud_model->fetch_data_program();
$data_array = array(
'seminar' => $data,
'conf' => $data1,
'extra' => $data2,
'cgpa' => $data3,
'representation' => $data4,
'participation' => $data5,
'organ' => $data6,
'events' => $data7,
'program' => $data8,
);
$showdata = [];
$html = $this->load->view('makepdf', $data_array, TRUE);
$pdfFilePath = "download.pdf";
$this->m_pdf->pdf->WriteHTML($html);
$this->m_pdf->pdf->Output(pdfFilePath . pdf, "D");
}
public function generatepdf() {
}
}
https://mpdf.github.io/reference/mpdf-functions/output.html –