Skip to content

Commit

Permalink
dynamic config base url
Browse files Browse the repository at this point in the history
  • Loading branch information
tianrosandhy authored Jul 12, 2019
1 parent f491648 commit b8cba44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions application/config/config.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

$config['base_url'] = 'http://localhost/php-simple-inventory';

$root = "http://".$_SERVER['HTTP_HOST'];
$root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['base_url'] = $root;
/*
|--------------------------------------------------------------------------
| Index File
Expand Down

0 comments on commit b8cba44

Please sign in to comment.