CodeIgniter 中国开发者社区's Archiver
论坛
›
CodeIgniter 问答求助
› 天然纯小白:如何在helper里写的函数调用config.php里的$config[]?
andyzu
发表于 2017-12-28 19:55:38
天然纯小白:如何在helper里写的函数调用config.php里的$config[]?
如题
Michael锐生
发表于 2017-12-29 12:33:09
一般来说,helper 里面的函数应该是功能性的函数,不会跟业务什么的挂钩,否则就失去了原本的意义。你可以考虑把 $config[] 作为函数参数传进去,或者你在函数里面用 include 或者 require 加载 config.php 也可以。
页:
[1]
查看完整版本:
天然纯小白:如何在helper里写的函数调用config.php里的$config[]?