admin URL |
Hii all,
I am a newbi in codeigniter. i am creating an admin panel inside application/controller/admin, application/views/admin, application/models/admin. but it is working but i am unable to use the images & javascript path, currently i am using <link href="<?php echo base_url(); ?>admin/css/bootstrap.css" rel="stylesheet">. it will not link to my css.
What html does that produce when the source is viewed in the browser?
The way i use base_url() is like this: <link href="<?php echo base_url('admin/css/bootstrap.css'); ?>" rel="stylesheet">
You can't have assets in the /system or /application dirs. Those aren't public dirs and are protected. Just create a new dir off your root to hold your admin assets. Here is what I typically use
/web_root --/application --/system (/system is usually outside of web_root) --/assets ----/frontend ------/css ------/js ------/img ----/admin ------/css ------/js ------/img Load a frontend asset: <link href="<?php echo base_url('assets/frontend/css/bootstrap.css'); ?>" rel="stylesheet"> Load an admin asset: <link href="<?php echo base_url('assets/admin/css/bootstrap.css'); ?>" rel="stylesheet"> |
Welcome Guest, Not a member yet? Register Sign In |