in my view, i try to print URL to my controller, below the code :
<p id="demo">
<a href="<?php echo site_url('HT');?>"> Goto Controller </a>
</p>
However those code provide HTML link error like this :
<a href="http://::1/cidLab/index.php/HT"> Goto Controller </a>
The link should be go to http://localhost/cidLab/index.php/HT but why must http://::1/ ?
I've try to use base_url, but still face same Error...
::1is the IPv6 loopback address, just as127.0.0.1is the IPv4 loopback address. It's just the IP representation of localhost and should still work. I wouldn't bother too much about how the URL looks on your local development environment as long as it works.