首页 >> 文档中心 >> 模板教程
DaoKeCMS的header/footer与页面文件可能被重复加载。模板内定义函数时用if(!function_exists('xxx')){...}包裹,避免重定义错误。
if (!function_exists('mytpl_helper')) { function mytpl_helper($arg) { // 函数逻辑 return $result; } }
扫码关注我们