Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何添加<;b></b>;在锚链内?_Html_Cakephp_Anchor - Fatal编程技术网

Html 如何添加<;b></b>;在锚链内?

Html 如何添加<;b></b>;在锚链内?,html,cakephp,anchor,Html,Cakephp,Anchor,嗨,我使用的是cakephp版本-2.5.5。我想在锚标记中添加Main Index 我想- <a href="/2014/myshowcam/msc/user-chat-images/"><b>Main Index</b></a> 我的代码- <?php echo $this->Html->link($this->Html->tag('b', 'Main Index'),'/user-chat-images/'

嗨,我使用的是cakephp版本-2.5.5。我想在锚标记中添加
Main Index

我想-

<a href="/2014/myshowcam/msc/user-chat-images/"><b>Main Index</b></a>

我的代码-

<?php echo $this->Html->link($this->Html->tag('b', 'Main Index'),'/user-chat-images/');?>

我的输出-

<a href="/2014/myshowcam/msc/user-chat-images/">&lt;b&gt;Main Index&lt;/b&gt;</a>


请建议我并让我知道如何在CakePHP格式的锚标记中添加

您必须将转义选项添加到false。阅读文档

echo $this->Html->link($this->Html->tag('b', 'Main Index'),'/user-chat-images/', array('escape' => false));

您可以始终在Cakephp中为所有链接、表单、文本和所有内容设置选项
'escape'=>false,以显示html代码。

我没有说任何关于谷歌的事情,我肯定不是一个透视者,我只是根据这样一个事实得出了一个结论,这个问题已经被问过很多次了,并且在烹饪书中有适当的记录。如果你不想让别人告诉你出了什么事,那就别自找麻烦。ps,所有的反对票都不是我投的。pps,谁删除了我以前的评论?