关于标签dede:global下使用function属性的问题及解决方法,请看下面的分析:
版本v5.5
使用
{dede:global name='keyword' /}可以正常获取到keyword的值,
加入function后
{dede:global name='keyword' function='str_replace(" ","-",@me)' /}keyword的值为空.
看了一个上午,终于解决了问题.是一个bug.
解决方案:
找到include/dedetag.class.php
找到第423行:
将
$str = $this->EvalFunc( $this->CTags[$i]->TagValue, $this->CTags[$i]->GetAtt('function'),$this->CTags[$i] );
修改为:
$str = $this->EvalFunc( $str, $t
免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。