将代码作为电报消息发送的PHP代码如下,
<?php
$a=1000;
$b=1200;
$c=1400;
$d="<ol align='left'> <font color=red size='4pt'> Salary statement for the Current month</font><br><li> <font color=blue>Salary of Mr. A is : $a$</font> </li><li> <font color=blue>Salary of Mr. B is : $b$</font></li><br><li> <font color=blue>Salary of Mr. C is : $c$</font></li></ol>";
file_get_contents($GLOBALS[site]."/sendmessage?chat_id=".$chatId."&text=".$d);
?>
电报聊天窗口中的输出应类似
Salary statement for the Current month
Salary of Mr. A is : 1000$
Salary of Mr. B is : 1200$
Salary of Mr. C is : 1400$
我得到的是
所有的html文本都是原样的,只是用它们的值替换了变量。
伙计们,我想发送一些变量的项目符号列表,以及短信到电报聊天。它如何可行?
在当前编写时,客户端仅支持bold、italic、code
和fence代码块。