How to export file in .dat or .txt format using php

后端 未结 1 1055
小鲜肉
小鲜肉 2021-01-27 07:33

I have function export_csv()to export file as .csv format. I want to change .dat or .txt format instead of .csv

Current code:

public function          


        
相关标签:
1条回答
  • 2021-01-27 08:12

    fwrite takes a string, not an array. Try something like this:

    fwrite($df, implode(', ', $row));
    
    0 讨论(0)
提交回复
热议问题