Exemplo n.º 1
1
 public function exec($command)
 {
     Logger::log('exec ' . $command);
     $result = ftp_exec($this->connectionId, $command);
     if (empty($result)) {
         Logger::log('exec command return false');
     }
     return $result;
 }
Exemplo n.º 2
0
 public function getConnection($type, $user, $pass, $hostname, $umask = '0755')
 {
     Logger::log('getConnection');
     switch ($type) {
         case 'ssh':
             $obj = new SSH($user, $pass, $hostname, $umask = '0755');
             break;
         default:
             $obj = new FTP($user, $pass, $hostname, $umask = '0755');
             break;
     }
     return $obj;
 }
Exemplo n.º 3
0
 public function close()
 {
     Logger::log('close ');
     return $this;
 }