Home  >  Article  >  Backend Development  >  DEDECMS-helper assistant extension, dedecms-helper_PHP tutorial

DEDECMS-helper assistant extension, dedecms-helper_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:09:11977browse

DEDECMS-helper assistant extension, dedecms-helper

Today I got stuck while doing DEDE dynamic call template, and was finally solved by the powerful Internet. Record the solution to the problem. process for later use

You can set the default helper initialization in /data/helper.inc.php, and the system loads the helper by default

For example, create a sample helper file test.helper.php

<span>1</span> <span>if</span> (!<span>function_exists</span>('HelloDede'<span>)){
</span><span>2</span>     <span>function</span><span> HelloDede(){
</span><span>3</span>         <span>echo</span> "Hello! Dede..."<span>;
</span><span>4</span> <span>    }
</span><span>5</span> }

Initialization: helper('test');

Use: HelloDede();

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/947051.htmlTechArticleDEDECMS-helper assistant extension, dedecms-helper got stuck while doing DEDE dynamic call template today. It was finally solved by the powerful Internet, and the process of solving the problem was recorded for future reference...
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