I am trying to Connect and Handle Files in SFTP Server using PHP. But i am getting error ssh2_connect Fatal error: Uncaught Error: Call to undefined function ssh2_connect(). If I installed SSH2 extension will it work for PHP 7 or any other option need.
try
{
$sftp = new SFTPConnection("HOST", 22);
$sftp->login("UN", "PWD");
$sftp->uploadFile("/tmp/to_be_sent", "/tmp/to_be_received");
}
catch (Exception $e)
{
echo $e->getMessage() . "\n";
}