ftp_base::login
Метод класса: ftp_base{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$ftp_base = new ftp_base(); $ftp_base->login( $user, $pass );
- $user
- .
По умолчанию:NULL - $pass
- .
По умолчанию:NULL
Код ftp_base::login() ftp base::login WP 7.0.2
function login($user=NULL, $pass=NULL) {
if(!is_null($user)) $this->_login=$user;
else $this->_login="anonymous";
if(!is_null($pass)) $this->_password=$pass;
else $this->_password="anon@anon.com";
if(!$this->_exec("USER ".$this->_login, "login")) return FALSE;
if(!$this->_checkCode()) return FALSE;
if($this->_code!=230) {
if(!$this->_exec((($this->_code==331)?"PASS ":"ACCT ").$this->_password, "login")) return FALSE;
if(!$this->_checkCode()) return FALSE;
}
$this->SendMSG("Authentication succeeded");
if(empty($this->_features)) {
if(!$this->features()) $this->SendMSG("Cannot get features list. All supported - disabled");
else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features)));
}
return TRUE;
}