I'm getting the current date-time.but not getting the ip address....the output is ::1 ..why this is happening ?enter image description here
<?php
defined('BASEPATH') or exit('No Direct Script Access Allowed');
class Ip_address extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->helper('url');
}
public function index(){
// var_dump($_SERVER);
$this->load->helper('date');
echo $date = "Current Time Is: ". date('Y-m-d H:i:s');
echo "<br/>";
echo $this->input->ip_address();
}
}