If you are coding locally the directory structure would be different, therefore use baseurl way. (like wordpress).
Edit the config file 'autoload.php'
Change this
$autoload['helper'] = array('');
to this >>
$autoload['helper'] = array('url');
Then you can use this: –
 
								 
								 
															











