【发布时间】:2014-11-19 22:51:15
【问题描述】:
如何在 Yii2 中创建我的配置?并返回例如 $新 = '新' 然后在其他类中使用它? 我的结构
Module
MyModule
config (directory)
config.php (here must be $new = 'new')
function (directory)
MyFunc ( here i need use variable from config)
感谢您的帮助! 代码来自
<?php
namespace module\MyModule\function;
class MyFunc
{
private static function func()
{
here i need to get $new from config
}
}
【问题讨论】:
-
你可以看看我自己的question中的链接