Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
807 stars 341 forks source link

Send file issue #185

Closed vahidsabet closed 3 years ago

vahidsabet commented 5 years ago

Hi buddies. I have issue to send file. Here is my code: $fp = fopen('php://output', 'w'); if ($fp && $rowT) { header('Content-Type: text/csv'); header('Content-Disposition: attachment; filename="export.csv"'); header('Pragma: no-cache');
header('Expires: 0'); fputcsv($fp, $headers); while ($row = mysqli_fetch_array($rowT)) { fputcsv($fp, $row["id"]); }

} $datat= array('chat_id' => $chat_id,'document'=> $fp); sendDocument($datat); how can I send created file?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.