0

I have this basic function a controller:

public function index(){
  if($this->input->ip_address() == XX.XX.XXX.XXX){
    $this->status(1);
  }
}
protected function status($status_no){
    echo $status_no;
}

But the status function does nothing. It doesn't even load. I can confirm my IP is correct and my IF statement & controller index is okay.

I will be looking forward to some help.

Peter

4

1 回答 1

1

您的代码应该可以工作,请尝试在 IF 语句之外调用该方法,我刚刚在全新的 CI 安装中对此进行了测试

于 2013-09-27T23:48:54.353 回答