fuel / docs

Fuel PHP Framework - Fuel v1.x documentation
http://fuelphp.com/docs
Other
166 stars 233 forks source link

Add how to get the current environment your application is using #669

Closed zechdc closed 9 years ago

zechdc commented 10 years ago

http://fuelphp.com/forums/discussion/7059/configget039environment039

WanWizard commented 10 years ago

You should always use \Fuel::$env.

Using $_SERVER is not reliable, because it might not be there, or it might be overridden in code (which makes it different from \Fuel::$env).