CodeIgniter + CSS

前端 未结 3 1062
旧时难觅i
旧时难觅i 2021-01-05 10:03

Good Day, I\'m learning CodeIgniter with Smarty. My CSS file is stored in

/App01/application/views/css/main.css

To link my CSS I use:

3条回答
  •  醉梦人生
    2021-01-05 10:46

    This will help to link css to codeigniter.

    The link_tag is used to link resources and you can use helper function. For example html helper, url helper, email helper, etc.

    In your controller you have to create a function something like

    load->helper('html');    
            $this->load->view('index');
        }
    }
    ?>
    

    And your index.php in view folder use link_tag keyword.

    
    
    
    
    
    
        
    
    
    

提交回复
热议问题