SetTemplet($tempfile);" to the external PHP page; then create a template file and add the "dedecms" tag code."/> SetTemplet($tempfile);" to the external PHP page; then create a template file and add the "dedecms" tag code.">
search
HomeCMS TutorialDEDECMSHow to use dedecms tag in your own php page

How to use dedecms tag in your own php page

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__).&#39;/../include/common.inc.php&#39;);//包含配置文件
require_once DEDEINC.&#39;/arc.partview.class.php&#39;;//包含partiew类
$tempfile = &#39;news.htm&#39;;//定义模板路径
$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=&#39;0,10&#39; }</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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Safe Exam Browser

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

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

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)