0
如何以qif格式导出我的数据。我没有任何想法,我怎么能? 请帮我找出方法。 在先进的感谢...如何使用codeigniter以QIF格式导出数据?
如何以qif格式导出我的数据。我没有任何想法,我怎么能? 请帮我找出方法。 在先进的感谢...如何使用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!';
}
}
谢谢你@elddenmedio,你的ans对我有帮助... – Angel