16 October, 2009

How to get base url from config?

1. Load the URL Helper on your controller.

You can load automatically url helper in to the configuration file called autoload.php or you can do it manualy(load it to your controller):
1 $this->load->helper('url');


2. The stylesheet call in your view file:

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

No comments:

Post a Comment