Home  >  Article  >  CMS Tutorial  >  What is the dede:php tag?

What is the dede:php tag?

藏色散人
藏色散人Original
2019-11-15 10:32:172888browse

What is the dede:php tag?

dede:php标签是什么?

dede:php标签简介

dede的标签虽然强大,但是很多功能还是无法很好的实现。此时可以使用其PHP标签,即在模板中写PHP语句来得到任何自己想要的东西。

标签名称:{dede:php} {/dede:php}

举2个小例子来证明其可以做任何事情:

1.输出1-100

{dede:php}
for($i=0;$i<100;$i++){
    echo $i.&#39;&#39;;
}
{/dede:php}

2.输出当前页面所在的顶级栏目名称

{dede:php}
if($refObj->Fields[&#39;reid&#39;]==0){
echo $refObj->Fields[&#39;title&#39;];
}else{
$reid = $refObj->Fields[&#39;reid&#39;];
$row=$dsql->GetOne(&#39;SELECT id,reid,typename from jifu_arctype where id = &#39;.$reid);
echo $row[&#39;typename&#39;];
}
{/dede:php}

The above is the detailed content of What is the dede:php tag?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn