Using global variables in CakePHP Shell scripts
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");
精彩评论