If you are coding locally the directory structure would be different, therefore use baseurl way. (like wordpress).
1 2 3 4 5 6 7 |
Edit the config file 'autoload.php' Change this $autoload['helper'] = array(''); to this >> $autoload['helper'] = array('url'); |
Then you can use this: -
1 2 3 |
<img src="<?php echo base_url('images/' . $animal); ?>" > |