cakephp文本hepler';s截断方法未给出正确的结果

cakephp文本hepler';s截断方法未给出正确的结果,php,cakephp,Php,Cakephp,嗨,我正在使用cakephp文本助手截断方法来显示只需要长度的文本字符串 echo $this->Text->truncate('my text with more than 500 characters ',10,array('ellipsis' => $this->Html->link(' Read More',$link,array('class'=>'readMore','target'=>'__blank')), 'exact' =>

嗨,我正在使用cakephp文本助手截断方法来显示只需要长度的文本字符串

echo $this->Text->truncate('my text with more than 500 characters ',10,array('ellipsis' => $this->Html->link('   Read More',$link,array('class'=>'readMore','target'=>'__blank')),
'exact' => true));
在这里,我给出了长度为10,但它仍然显示了完整的结果(即整个字符串和最后一个链接“readmore”)。但当我给$length的值大于100时,它工作得很好(结果是一个包含100个字符的字符串)


这是cakePHP帮助程序逻辑错误还是我使用它的方式错误?

您不应该将HTML帮助程序内容传递给“省略号”,HTML帮助程序会产生一个已经超过10个字符的长字符串