0
我正在使用codeigniter並創建一個用於生成和下載pdf的功能。 當我在本地主機上實現它的工作非常好。 但它不是活的服務器上的工作(其未服用陣列(寬度=> 550)。 我在趕時間,請幫我在此先感謝 這裏是我的代碼,請檢查一下在codeigniter中創建並下載pdf
public function invoice_pfd(){
$this->load->library('cezpdf');
$this->load->helper('pdf');
prep_pdf(); // creates the footer for the document we are creating.
$db_data[] = array('name' => 'Jon Doe', 'phone' => '111-222-3333', 'email' => '[email protected]');
$db_data[] = array('name' => 'Jane Doe', 'phone' => '222-333-4444', 'email' => '[email protected]');
$db_data[] = array('name' => 'Jon Smith', 'phone' => '333-444-5555', 'email' => '[email protected]');
$col_names = array(
'name' => 'Name',
'phone' => 'Phone Number',
'email' => 'E-mail Address'
);
$this->cezpdf->ezTable($db_data, $col_names, 'My Invoice', array('width' => 1550));
$this->cezpdf->ezStream();
//$data['social'] = $this->Business_model->social_data();
}
您有錯誤?我們可以工作的東西? –
不,沒有任何錯誤它的工作正常,但它沒有采取寬度。 –
請按照本教程 - http://christophermonnat.com/blog/generating-pdf-files-using-codeigniter –