我有问题。我使用 wordpress 并且从昨天开始不起作用链接在数据库中我有代码:
<a href="dakjhd">text</a>
但是在wordpress的文本编辑器中我有
  text  
我不知道为什么要转换为
现在不能加链接了。。。
请帮忙
在步骤:
- 将链接添加到我的文本
- 我在数据库中签入此文本,我看到了
<a href="dakjhd">text</a> - 我在文本编辑器中检查了这段文本,我看到了
  text   - 我不知道。
您的代码可能strip_tags()用于从实际 HTML 中删除标签。您可以使用html_entity_decode它来恢复其原始形式。
例子:
<?php
$link = '<a href="dakjhd">text</a>';
$a = strip_tags($link);
$b = htmlentities($link);
$c = html_entity_decode($b);
echo $a; // output: text
echo $b; //output: <a href="dakjhd">text</a>
echo $c; //output: the actual link
?>
希望能解开你的疑惑!