Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- class CI_Config
- {
- public $config = [];
- public $is_loaded = [];
- public $_config_paths = [APPPATH];
- public function __construct()
- {
- $this->config = &get_config();
- if (empty($this->config['base_url'])) {
- if (isset($_SERVER['SERVER_ADDR'])) {
- if (strpos($_SERVER['SERVER_ADDR'], ':') !== false) {
- $server_addr = '[' . $_SERVER['SERVER_ADDR'] . ']';
- }
- else {
- $server_addr = $_SERVER['SERVER_ADDR'];
- }
- $base_url = (is_https() ? 'https' : 'http') . '://' . $server_addr . substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME'])));
- }
- else {
- $base_url = 'http://localhost/';
- }
- $this->set_item('base_url', $base_url);
- }
- log_message('info', 'Config Class Initialized');
- }
- public function load($file = '', $use_sections = false, $fail_gracefully = false)
- {
- $file = ($file === '' ? 'config' : str_replace('.php', '', $file));
- $loaded = false;
- foreach ($this->_config_paths as $path) {
- foreach ([$file, ENVIRONMENT . DIRECTORY_SEPARATOR . $file] as $location) {
- $file_path = $path . 'config/' . $location . '.php';
- if (in_array($file_path, $this->is_loaded, true)) {
- return true;
- }
- if (!file_exists($file_path)) {
- continue;
- .................................................................
- .....................................
- .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement