I'm new to YII framework and i'd like to know if there's way to know/check if you are running from console or in a browser?
Thanks!
You should also be able to do:
echo get_class(Yii::app());
which will tell you what type of app you're in ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With