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 回答