PHP Classes

File: config.php

Recommend this page to a friend!
  Classes of raghavender   Configuration file setup   config.php   Download  
File: config.php
Role: Example script
Content type: text/plain
Description: configure php variables which are used in application
Class: Configuration file setup
Read configuration values from JSON files
Author: By
Last change: load Configuration class and define global params
Date: 8 years ago
Size: 573 bytes
 

Contents

Class file image Download
<?php
include_once 'Configuration.php';
$con = new Configuration();
$config_vars = $con->constants();

defined('APPLICATION_PATH') || define('APPLICATION_PATH', $config_vars['application_path']);

//Social Media Settings
defined('FB_ID') || define('FB_ID', $config_vars['social_media_settings']['fb_api_key']);

defined('GPLUS_CLIENT_KEY') || define('GPLUS_CLIENT_KEY', $config_vars['social_media_settings']['gplus_client_key']);
defined('GPLUS_CLIENT_SECRET') || define('GPLUS_CLIENT_SECRET', $config_vars['social_media_settings']['gplus_client_secret']);

?>