0
votes

I have configured CI3 in my localhost,

I have followed all the steps to work with CI
1) Opened routes and set it to $route['default_controller'] = 'login';
2)In config.php settings are....

`$config['base_url'] = '';
`$config['index_page'] = '';
`$config['uri_protocol']= 'REQUEST_URI';`

3)url helper included in autoload.php

So,there is no scope of any CI error and it works fine totally... My only concern is when i use base_url() to include files and call it the output provided is "http://::1/project_name/"

So,why it is not providing proper path exactly?

2
You need to set the base url in config.php file..amit

2 Answers

1
votes

Your $config['base_url'] is not defined in config.php. Define as:

$config['base_url'] = 'localhost/yourcms/';
0
votes

Before using base_url() in CI. You have to first edit config.php file with

$config['base_url'] = 'http://localhost:8080/Myproject/';

In this case i have used localhost:8080, which is my port number for server.