Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$this->CI->request->getIPAddress() protected #776

Closed
demortx opened this issue Oct 14, 2017 · 3 comments
Closed

$this->CI->request->getIPAddress() protected #776

demortx opened this issue Oct 14, 2017 · 3 comments

Comments

@demortx
Copy link

demortx commented Oct 14, 2017

use \App\Libraries;
Controllers -> new \Authentication($this);

$this->CI->request->getIPAddress() Cannot access protected property App\Controllers\Main::$request

how to get ip?

@deathart
Copy link
Contributor

deathart commented Oct 15, 2017

"$this->CI" equals what?

My code :

use CodeIgniter\HTTP\IncomingRequest

$this->request = \Config\Services::request();
$this->request->getIPAddress();

Réf https://bcit-ci.github.io/CodeIgniter4/libraries/request.html?highlight=ip#getIPAddress

@InsiteFX
Copy link
Contributor

There is no more CodeIgniter Super Object.

@jim-parry
Copy link
Contributor

Asked & answered on the forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants