config.php
file (or whatever you call it) that just returns an array:$ini
array.$configs->host
instead of $configs['host']
.config.php
file contain all your configs (centralized in one file instead of one for JavaScript and one for PHP). The trick would then be to have another PHP file that would echo
only the client side info (to avoid showing info you don't want to show like database connection string). Call it say get_app_info.php
:config.php
contains an app_info
parameter:$http.get('get_app_info.php').then(...);
type of call.