PHP不要写口音
我的代码生成了一条消息,我使用file_get_contents获取它们。但是,此消息最终可以用某种语言具有重音,例如Á,â,ç
。好的,这不会引起一些问题。
但是,例如,WhatsApp不会阅读& cedil,此消息将被截断。
我如何更改诸如$ ccedil之类的代码;对于PHP变量,源是快速的?
$fim = file_get_contents($pedidoaux);
header("Location: http://api.whatsapp.com/send?1=pt_BR&phone=WHATSAPPNUMBER&text=$fim");
My code generates a message that I get them with file_get_contents. However, this message can be, eventually, have accents in some words, like á, ã, ç...
The PHP change this accented characters to special characters, like a ç. Ok, this not cause some problem.
However, the whatsapp dont read ¸, for example and this message will be truncate.
How I change the codes like $ccedil; for ç in a PHP variable on by fast way?
$fim = file_get_contents($pedidoaux);
header("Location: http://api.whatsapp.com/send?1=pt_BR&phone=WHATSAPPNUMBER&text=$fim");
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
URL只能包含ASCII字符。对于其他任何内容,您需要编码它们。使用
urlencode()
。URLs can only contain ASCII characters. For anything else, you need to encode them. Use
urlencode()
.