如何使用 codeigniter 以 QIF 格式导出数据?

How to export data in QIF format using codeigniter?

我如何以 qif 格式导出数据。我没有任何想法,我怎么能? 请帮我看看路

试试这个 //我不知道qif文本格式是什么,但是用这个你可以写一个文件

write_file.php

public function write_qif( $info ){
    $this->load->helper(array('file','download'));
    $_info    = $this->some_model->get_info($info);//return object
    $qif_text = '
                 !Type:'.$_info->type.'//BANK
                 D'.$_info->date1.'//03/03/10
                 T-379.00
                 P'.$_info->city.'//CITY OF
                 ^
                 D'.$_info->date2.'//03/04/10
                 T-20.28
                 P'.$_info->maket_place.'//YOUR LOCAL SUPERMARKET
                 ^
                 D'.$_info->date3.'//03/03/10
                 T-421.35
                 P'.$_info->product.'//...WATER UTILITY
                 ';

    if ( ! write_file('./path/to/file.qif', $_info)){
        echo 'Unable to write the file';
    }
    else{
        $data = file_get_contents(.'/path/to/file.qif');
        $name = 'myqiffile.qif';

        force_download($name, $data); 
        echo 'File written!';
    }
}