Welcome Guest, Not a member yet? Register   Sign In
dummy question about paths
#1

[eluser]plainas[/eluser]
Where should i place my css and js files?
Right in the controllers folder?
#2

[eluser]schnoodles[/eluser]
I usually do mine at the base as

/media
-/css
-/theme1
-/theme2
-/js
-/img

Although if you wanted to you could put them under the webroot.
#3

[eluser]Valdemar[/eluser]
My preferred file structure looks like:
Code:
-/
--/css
--/js
--/images
--/other-files
--/system
--/system/application/
--/system/application/.htaccess which disallows view of the application folder.
--/system/application/data which contains data loaded within my application that should not be seen by anyone.
.....

Doing so allows me to just use

Code:
<?php echo base_url()."css/main.css";?>

within my views and all's working just fine Smile
#4

[eluser]esra[/eluser]
For another solution, do a search on assets helper. There is an original version written by Nick Cernis and another version written later with some additional functions.




Theme © iAndrew 2016 - Forum software by © MyBB