How To Set Base_url() Path in Codeigniter?

Qus1-What is baseurl in CodeIgniter?

Ans-base url is root url of CodeIgniter project . This url used for include external file in CodeIgniter project.

Step to set the baseurl path:-

  • In our CodeIgniter project go to the application/config
  • in config folder open config.php file 
  • in config.php set baseurl .
Syntax:-

$config['base_url'] = 'base_url';

Example:-

$config['base_url'] ='http://localhost/codeigniter-project-name';

Tagged:
Sign In or Register to comment.