Дата выпуска в CSV

Экспорт в CSV работает. Но формат даты ######## для даты 11/11/2014. Результат
11 октября, 14 за 7.11.2014. Ошибка в течение 2 цифр для даты. Может ли кто-нибудь решить проблему?

$fp = fopen('reports-export/publications_report-'.$from.'.csv', 'w');
fputcsv($fp, $header);
fputcsv($fp, array(date('M d, Y',strtotime($data_print->pfile_date))));
fclose($fp);
$file = 'reports-export/publications/publications_report-'.$from.'.csv';

if (file_exists($file)) {

//set appropriate headers
header('Content-Description: File Transfer');
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename='.basename($file));
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();

//read the file from disk and output the content.
readfile($file);

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector