php - How to load css files, javascript files and images in codeigniter? -


my application structure is

application

assets

  -css   -images   -js 

system

1- load url helper in controller's constructor,

$this->load->helper('url'); 

2- use base url function load js, css files in view

<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>css/style.css"> 

p.s: have put js, css files in root folders. (default)


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -