Path : /var/www/html/kpp2meeting/application/config/
File Upload :
Current File : /var/www/html/kpp2meeting/application/config/database.php

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$url = $_SERVER['PHP_SELF'];
$chars = preg_split('//', $url, -1, PREG_SPLIT_NO_EMPTY);
$slash = 2; // 3rd slash
$i = 0;
foreach($chars as $key => $char) {
    if($char == '/') {
        $j = $i++;
    }
    if($i == 2) {
        $pos = $key;
        break;
    }
}
$main_base = substr($url, 0, $pos);
require_once($_SERVER['DOCUMENT_ROOT'].$main_base.'/database.php');