I'm trying to use phpseclib to download with php 5.3.
however I'm not getting it to work.
My test is this code:
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
// include './phpseclib/Net/SFTP.php';
use \phpseclib\Net\SFTP;
$sftp = new SFTP('192.168.0.65');
if (!$sftp->login('oracle', '142536')) {
exit('Login Failed');
}
echo $sftp->pwd() . "\r\n";
$sftp->put( '/home/oracle/teste.txt','./teste.txt',$sftp::SOURCE_LOCAL_FILE);
$texto = $sftp->get('/home/oracle/teste.txt');
echo $texto;
?>
</body>
</html>
However it always returns:
( ! ) Fatal error: Class 'phpseclib\Net\SFTP' not found in C:\workspace\ssh_php\index.php on line 17
Call Stack
# Time Memory Function Location
1 0.1068 127552 {main}( ) ..\index.php:0
How do I recognize the namespace in a structured code?