Home  >  Article  >  Backend Development  >  DEDECMS-helper assistant extension

DEDECMS-helper assistant extension

WBOY
WBOYOriginal
2016-08-08 09:30:401018browse

Today I got stuck while doing DEDE dynamic call template. It was finally solved by the powerful Internet. I will record the process of solving the problem for future reference

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();

The above introduces the DEDECMS-helper assistant extension, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

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
Previous article:Study Notes PHP (3)Next article:Study Notes PHP (3)