Home > Backend Development > PHP Tutorial > [PHP website] How to use dedecms v5.7 front-end template to output variables

[PHP website] How to use dedecms v5.7 front-end template to output variables

little bottle
Release: 2023-04-05 22:46:01
forward
2360 people have browsed it

dedecmsv5.7 is a PHP website content management system. This article will introduce how to use the dedecmsv5.7 front-end template to output variables. It has certain reference significance. Interested friends can learn about it.

How to assign the data queried from the PHP file to the front-end page for display?

For example:

PHP file: agency.php


require_once(dirname(__FILE__) . '/../../include/common.inc.php');
require_once(DEDEINC.'/arc.agency.class.php');
$test = 123;$arc = new agency(DEDETEMPLATE."/default/agency/edit_face.htm");
$arc->Display();
Copy after login

Front-end template: edit_face.htm


<!--输出变量-->
{dede:global name="test"/}
Copy after login

Or:


<!--输出变量-->
{dede:global.test/}
Copy after login

Output variable: {dede:global.Variable name}

Recommended courses:PHP video tutorial

The above is the detailed content of [PHP website] How to use dedecms v5.7 front-end template to output variables. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:cnblogs.com
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template