当我将从mysql数据库读取的数据发送给电报用户时,用户得到下划线等而不是换行符。所以这样我就不能正确格式化消息文本。
如何格式化包含 4 个或更多可能答案的问题的电报消息?
还有什么我没想到的会发生变化?顺便说一句,我正在发送非英语字符。
$qsBody = $rowQuestion['body']; // This is what I read from database that contains some new line characters
$strReply = $qsBody;
$strSendMethod = "SendMessage?chat_id=$ChatId&text='$strReply'";
file_get_contents( BOT_TARGET_ADDRESS . $strSendMethod );
// The message received by user contains _ instead of new line.