How to use the dedecms tag in your own php page?
This article mainly introduces code examples for using dedecms tags in your own PHP pages. Friends in need can refer to it
Recommended learning: 梦Weavercms
Step 1: Add the following code to the external php page:
<? require_once (dirname(__FILE__).'/../include/common.inc.php');//包含配置文件 require_once DEDEINC.'/arc.partview.class.php';//包含partiew类 $tempfile = 'news.htm';//定义模板路径 $pv = new PartView();//初始化类 $pv->SetTemplet($tempfile);//设定模板文件路径 $pv->Display();//显示该页面 ?>
Step 2: Create a template file (news.htm) and add dedecms tag code, for example, the following code calls the website Titles and links of the first ten articles in column id=1:
Copy code
The code is as follows:
{dede:arclist orderby=id orderway=desc typeid=1 limit='0,10' }</p> <p><li><a href="[field:arcurl/]">[field:title/]</a></li></p> <p>{/dede:arclist}
Through the above two steps, it can be achieved The external PHP page calls the target data through the dedecms tag code.
The above is the detailed content of How to use dedecms tag in your own php page. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version
Recommended: Win version, supports code prompts!

SublimeText3 Mac version
God-level code editing software (SublimeText3)