0
votes

I'm stuck on an issue for hours and I can't get rid of it, I'm trying to load my bootstrap files from my asset folder but I got a 404 error.

As you can see my assets folder is in my root folder

enter image description here

I call it with base_url function in the head:

<link href="<?php echo base_url('assets/css/bootstrap.css'); ?>" rel="stylesheet">

And I got this error in my console:

GET http://127.0.0.1/WeBusy/assets/css/bootstrap.css

GET http://127.0.0.1/WeBusy/assets/js/bootstrap.min.js 404 (Not Found)

EDIT

I noticed that everything related to files is failing, for example if I autoload the library session, I have this errors:

Message: mkdir(): Invalid path
Filename: drivers/Session_files_driver.php

Message: Session: Configured save path '' is not a directory, doesn't exist or cannot be created.
Filename: C:\Users\User\Dropbox\WeBusy\system\libraries\Session\drivers\Session_files_driver.php
2

2 Answers

0
votes

I think you have left your base url blank

$config['base_url'] = '';

Change to

WARNING: You MUST set this value!

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

If you are using CI3 versions must be set

You may need to use index.php

<link href="<?php echo base_url('index.php/assets/css/bootstrap.css'); ?>" rel="stylesheet">
0
votes

Access it like this:

<link href="<?php echo base_url(); ?>assets/css/bootstrap.css" rel="stylesheet">