i was testing my code only in my controler and it worked, when i went to put all in the model and call the functions in the controller it wont connect to the sftp server.
require "vendor/autoload.php";
use phpseclib\Net\SFTP;
class sftpInno extends SFTP{
private $Host;
private $Port;
private $Username;
private $Password;
public function __construct()
{
$this->Host = '192.168.61.192';
$this->Port = '99';
$this->Username = 'tester';
$this->Password = 'password';
}
public function SFTPLogin()
{
$return = true;
if (!$this->login($this->Username, $this->Password)) {
$return = false;
}
return $return;
}
Controller
$InnoSFT = new sftpInno();
$return = $InnoSFT->SFTPLogin();
Any toughts? Thanks