I’m just starting with CodeIgniter, and I am not sure where things such as css, js, and images should go. Outside the whole system folder seems ok, but that means everything is seperate. Inside means the filepaths are longer, and I’m worried that it might mess things up. What’s the best practice on this issue?
Share
I usually put separate folders at the root level, so I end up with a directory structure like this:
Seems to work for me – when you use
site_url(url), the URL it generates is from the root, so you can usesite_url('css/file.css')to generate URLs to your stylesheets etc.