您好,欢迎访问一九零五行业门户网

从数据库中提取的带有HTML标签的数据经过XML传输后HTML标签消失了,如何保存用XML传输并且保存带有HTML标签的数据?

$query=mysql_query(select text from opus where id=$id,$dbconn);
while($row= mysql_fetch_array($query)){ $text3=$row['text']; $text4=html_entity_decode($text3); echo $text4;}

如上面这样 直接echo $text是ok的
但是像下边这样用xml返回到前端页面格式就变了
echo ;echo ;echo ;echo $text4;echo $id;echo ;echo ;求解~~

回复内容: $query=mysql_query(select text from opus where id=$id,$dbconn);
while($row= mysql_fetch_array($query)){ $text3=$row['text']; $text4=html_entity_decode($text3); echo $text4;}

如上面这样 直接echo $text是ok的
但是像下边这样用xml返回到前端页面格式就变了
echo ;echo ;echo ;echo $text4;echo $id;echo ;echo ;求解~~

其它类似信息

推荐信息