开发者

Using global variables in CakePHP Shell scripts

开发者 https://www.devze.com 2023-01-08 03:50 出处:网络
Using CakePHP\'s shell scripts I\'m having problems acce开发者_开发百科ssing constants, which I normally set within config/bootstrap.php.

Using CakePHP's shell scripts I'm having problems acce开发者_开发百科ssing constants, which I normally set within config/bootstrap.php.

Is this because using shell scripts I'm not going through the normal dispatcher routine? What's the best practice for defining constants across shell scripts?

Thanks.


You can define the constant in app/config/bootstrap.php like this define("ADMIN_TITLE", "Administrator");

0

精彩评论

暂无评论...
验证码 换一张
取 消