我正在尝试实现以下代码。
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<?php
$str="<Source of the rule. E.g. stakeholder>";
echo $str;
?>
</body>
</html>
但是我无法使用echo命令在屏幕上将字符串作为输出输出。我也使用了strip_tags
函数,但是没有用。谁能帮助我使用PHP打印确切的字符串。输出为黑屏。屏幕上什么都没有打印。
使用htmlentities
和html_entity_decode
的组合
$str='<Source of the rule. E.g. stakeholder>';
echo htmlentities(html_entity_decode($str));