给有属性的文档加入指定的图标或者图片,注意单双引号
属性文章文字提示
[field:flag runphp=yes] if(stristr(@me,"c")) @me = "[推荐]";else @me = "";[/field:flag]
[field:flag runphp=yes] if(stristr(@me,"a")) @me = "[特荐]";else @me = "";[/field:flag]
属性文章图片提示
[field:flag runphp=yes] if(stristr(@me,"a")) @me = "<img src='图片地址'>";else @me = "";[/field:flag]
[field:flag runphp=yes] if(stristr(@me,"c")) @me = "<img src='图片地址'>";else @me = "";[/field:flag]
本文介绍了一种在具有特定属性的文档中插入指定图标或图片的方法,通过使用PHP代码片段实现对文档属性的判断并相应地添加图片或文字提示,适用于网站内容管理和个性化展示。
1569

被折叠的 条评论
为什么被折叠?



