0

これはコントローラーの私のコードです

function exportPDF() 
{
    $this->load->library('cezpdf');
    $this->load->helper('pdf');
    $this->cezpdf->cezpdf('a4','portrait');
    $data['unit_kerja']= $this->admin_model->getUnitKerjaPDF();
    $titlecolumn = array(
                        'id_indeks' => 'Nomor Indeks',
                        'nama_unit' => 'Nama Unit Kerja'
    );
    $this->cezpdf->ezTable($data['unit_kerja'],$titlecolumn,'Master Unit Kerja');
    $image=base_url().'images/bps.png';
    $this->cezpdf->ezImage($image);
    $this->cezpdf->ezSetMargins(50,50,50,50);
    $this->cezpdf->addText(50,32,8,'Printed on ' . date('m/d/Y h:i:s a'). ' copyright cmail system BPS');
    $this->cezpdf->ezStream();
}

コントローラーを呼び出したとき、データはうまく表示されますが、画像を読み込めません...ありがとう...

4

1 に答える 1

0

画像に読み込んでいる画像が正しく読み込まれていません。

あなたが持っている:

$image=base_url().'images/bps.png';

これを内部的に参照する必要があります。たとえば、次のようになります。

$image=BASEPATH.'images/bps.png';
于 2012-07-05T15:19:54.373 に答える