I have separate config js file which is included in header.
<script type="text/javascript" src="<?php echo base_url();?>assets/js/config.js.php"></script>
In this file I keep all config js variables that are need in later js. A file looks like this:
var CONFIG = (function() {
var private = {
'IMAGE_DIR': 'example1',
'UPLOAD_IMAGE_LANG': 'Upload photo',
'BASE_URL':'',
'USER_UPLOAD_URL':''
};
return {
get: function(name) { return private[name]; }
};
})();
The problem I have is how to pass values from php CI config constants to this file so I won't need to type the same config values in two places.
tnx