芝麻web文件管理V1.00
编辑当前文件:/home/asmplong/www/ancien-site-2019/site/administrator/components/com_akeeba/models/config.php
$this->getState('host'), 'port' => $this->getState('port'), 'user' => $this->getState('user'), 'pass' => $this->getState('pass'), 'initdir' => $this->getState('initdir'), 'usessl' => $this->getState('usessl'), 'passive' => $this->getState('passive'), ); // Perform the FTP connection test $test = new AEArchiverDirectftp(); $test->initialize('', $config); $errors = $test->getError(); if(empty($errors) || $test->connect_ok) { $result = true; } else { $result = $errors; } return $result; } public function testSFTP() { $config = array( 'host' => $this->getState('host'), 'port' => $this->getState('port'), 'user' => $this->getState('user'), 'pass' => $this->getState('pass'), 'initdir' => $this->getState('initdir'), ); // Perform the FTP connection test $test = new AEArchiverDirectsftp(); $test->initialize('', $config); $errors = $test->getError(); if(empty($errors) || $test->connect_ok) { $result = true; } else { $result = $errors; } return $result; } }