The thing is this, it turns out that when I use codeigniter's helper: "form", the url it generates for the action property has something strange at the beginning, this [::1]. What does that mean? What should I configure to display the IP correctly, in my case 127.0.0.1
<?php echo form_open('cliente/get'); ?>
<h3>Buscar</h3>
<input type="text" id="ci-busq" />
<button type="button" onclick="buscarCliente(event)"> Ok</button>
</form>
Seeing in the browser console, I verify that the generated url is like this:
This happens because your
base_url
is empty. All you need to do is go to the fileconfig.php
located in the directory:application/config/config.php
.The text
[::1]
is equivalent tolocalhost
.More information at: Wikipedia
Answer Reference: Codeigniter echoing [::1] instead of localhost