apache2.4 - PHP server define -
apache2.4 - PHP server define -
i have 2 servers php project, 1 prod , 1 tests.
i want add together test server flag utilize in every php file. illustration add together define('test', true)
how can set define in "server level"? mean define in ini
or somthing, not in php page.
you should utilize environment variables this.
in apache, instance, can utilize mod_env set environment variable in virtualhost
directive test server:
setenv application_env testing
and live server:
setenv application_env production
you utilize in php:
$environment = getenv('application_env'); if ($environment == 'testing') { // ... }
php apache2.4
Comments
Post a Comment