温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

phpcms调用相关文章的方法

发布时间:2020-07-29 11:45:04 来源:亿速云 阅读:231 作者:小新 栏目:建站服务器

今天小编给大家分享的是phpcms调用相关文章的方法,相信很多人都不太了解,为了让大家更加了解,所以给大家总结了以下内容,一起往下看吧。一定会有所收获的哦。

1.PHPcms系统调用随机文章:

{pc:content action=”lists” catid=”$catid” num=”8″ order=”rand()” return=”info”}
<ul>
{loop $info $v}
<li><a href=”{$v['url']}” target=”_blank” title=”{$v['title']}”{title_style($v[style])}>{$v['title']}</a></li>
{/loop}
</ul>
{/pc}

2.PHPcms系统调用相关文章:

{get sql=”select keywords from phpcms_content where contentid=$contentid and status=’99′” return=”gt”}{/get}
{php $tempkey = get_sql_in($gt[keywords]);}
{get sql=”SELECT DISTINCT c.contentid,c.thumb,c.title,c.style,c.url FROM `phpcms_content` c,`phpcms_content_tag` t WHERE c.contentid=t.contentid and c.status=99 and c.contentid!=$contentid and c.catid=$catid AND t.tag IN($tempkey) ORDER BY c.contentid DESC” rows=”6″ return=”k”}
<tr>
<td ><span><a href=”{$k[url]}” title=”{$k[title]}”>{str_cut($k[title], 26,”)}</a></span></td>
</tr>
{/get}

关于phpcms调用相关文章的方法就分享到这里了,希望以上内容可以对大家有一定的参考价值,可以学以致用。如果喜欢本篇文章,不妨把它分享出去让更多的人看到。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI