How to load a controller class from admin to controller class in catalog
/admin/controller/tool/getip.php
load function ip() from getip.php in: /catalog/controller/account/account.php
getip.php
class ControllerGetIp extends Controller {
public function ip() {
return ...;
}
...
}
account.php
class ControllerAccount extends Controller {
public function index() {
load ip();
..
}
Try to write the code below in your account controller