css, js, img in view don't work |
I have this structure but can't acces (css, js, img) files
Code: <?php echo base_url('application/views/admin/css/style.css'); //don't work ?> application - views -- template --- admin ---- css ----- style.css ---- js ---- img --- default ---- css ----- style.css ---- js ---- img i have this .htaccess RewriteEngine On #RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) index.php/$1 [L] Now i remove htaccess from application but is not a good solution
You need to place your assets folder in the root along with index.php
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
You need to place your assets folder outside the application folder like:
your project folder application assets etc.... the access the files like: PHP Code: <?php echo base_url('asstes/css/style.css'); OR PHP Code: <?php echo base_url()assets/css/style.css ?>;
What your doing is wrong You need to place your assets folder outside the application folder and not inside it should be like:
This below application assets etc.... the access the files Not the way you are doing it now
E-surf
i know use assets but i need this structure
application - views -- template --- admin ---- css ----- style.css ---- js ---- img --- default ---- css ----- style.css ---- js ---- img
You can change the view folder in index.php to point to your own view folder.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |