In CodeIgneter we will set it in application/config/config.php
Place this
$root = "http://".$_SERVER['HTTP_HOST'];
$root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['base_url'] = "$root";
//$config[base_url] = "http://localhost/";
In Laravel we will set it in config/app.php
$root = "http://".$_SERVER['HTTP_HOST'];
$root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
return [
'debug' => env('APP_DEBUG', false),
//'url' => 'http://localhost',
'url' => $root,
.......
So this is easy to fix all problem in your drive/ PC and your hosting wherever you want.
0 komentar:
Post a Comment