We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/** * 过滤文字回复\r\n换行符 * @param string $text * @return string|mixed */ private function _auto_text_filter($text) { if (!$this->_text_filter) return $text; return str_replace("\r\n", "\n", $text); }
以上为实现文本消息回复的换行,其中str_replace("\r\n", "\n", $text);是无法识别到\r\n.
正确应为 return str_replace("\\r\\n", "\n", $text);
return str_replace("\\r\\n", "\n", $text);
The text was updated successfully, but these errors were encountered:
人家不是那个意思,不是让你用字符写\r\n这四个字符的,只是不要用windows的换行符而已。
Sorry, something went wrong.
No branches or pull requests
以上为实现文本消息回复的换行,其中str_replace("\r\n", "\n", $text);是无法识别到\r\n.
正确应为
return str_replace("\\r\\n", "\n", $text);
The text was updated successfully, but these errors were encountered: