Welcome Guest, Not a member yet? Register   Sign In
Adding custom css to CI
#1

I have seen several threads on this subject but none so far, helped.
I am rebuilding a native php/html/bootstrap site to CI as a first time CI user.

I am getting the message: The configuration file url.php does not exist. on loading my page (http://www.hdkumdo.com/swords/)
The underlying html is: <p>The configuration file url.php does not exist.</p> </div>

I am using the basic sample from the CI tutorial to create header/content/footer separation. Starting with the sample which worked,
I wanted to add elements of my own to the respective parts (header/footer etc) so step 1 was to include my css and some basic bootstrap code. I have not downloaded bootstrap, rather I have referred to a cdn in the header.php file, as follows: 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
which is followed by my css link, both of which are just prior to </head>
<link rel="stylesheet" href="<?php echo base_url("css/custom.css"); ?>" />

The directory structure is:
public_html->swords->css(custom.css)
I have also tried:
public_html->swords->assets/css(custom.css)

The problem seems to be related to php echo base_url() looking for a file called url.php and I don't understand why. It looks like 'url' comes from the contents of autoload but this is what a tutorial at http://www.kodingmadesimple.com/2014/06/...ework.html states is required.

I have:


- $config['base_url'] = 'http://www.hdkumdo.com/swords/'; in config.php
- $autoload['config'] = array('url'); in autoload.php
- a known working css file (works outside CI)

I have not done anything to .htaccess as I have used routing to remove the url parts for the index.php etc.

Thoughts would be greatly appreciated.
Cheers
Geoff
Reply
#2

$autoload['config'] is not the correct way of loading the url helper! Change it to:
PHP Code:
$autoload['helper'] = array('url'); 
in your autoload.php file.
Reply
#3

Thank you very much. Clearly got confused between config and autoload.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB