| @@ 180-182 (lines=3) @@ | ||
| 177 | * @author Dmitry (dio) Levashov |
|
| 178 | **/ |
|
| 179 | protected function connect() { |
|
| 180 | if (!($this->connect = ftp_connect($this->options['host'], $this->options['port'], $this->options['timeout']))) { |
|
| 181 | return $this->setError('Unable to connect to FTP server '.$this->options['host']); |
|
| 182 | } |
|
| 183 | if (!ftp_login($this->connect, $this->options['user'], $this->options['pass'])) { |
|
| 184 | $this->umount(); |
|
| 185 | return $this->setError('Unable to login into '.$this->options['host']); |
|
| @@ 183-186 (lines=4) @@ | ||
| 180 | if (!($this->connect = ftp_connect($this->options['host'], $this->options['port'], $this->options['timeout']))) { |
|
| 181 | return $this->setError('Unable to connect to FTP server '.$this->options['host']); |
|
| 182 | } |
|
| 183 | if (!ftp_login($this->connect, $this->options['user'], $this->options['pass'])) { |
|
| 184 | $this->umount(); |
|
| 185 | return $this->setError('Unable to login into '.$this->options['host']); |
|
| 186 | } |
|
| 187 | ||
| 188 | // switch off extended passive mode - may be usefull for some servers |
|
| 189 | @ftp_exec($this->connect, 'epsv4 off' ); |
|
| @@ 15-17 (lines=3) @@ | ||
| 12 | * @return bool |
|
| 13 | **/ |
|
| 14 | protected function connect() { |
|
| 15 | if (!($this->connect = ftp_connect($this->options['host'], $this->options['port'], $this->options['timeout']))) { |
|
| 16 | return $this->setError('Unable to connect to FTP server '.$this->options['host']); |
|
| 17 | } |
|
| 18 | if (!ftp_login($this->connect, $this->options['user'], $this->options['pass'])) { |
|
| 19 | $this->umount(); |
|
| 20 | return $this->setError('Unable to login into '.$this->options['host']); |
|
| @@ 18-21 (lines=4) @@ | ||
| 15 | if (!($this->connect = ftp_connect($this->options['host'], $this->options['port'], $this->options['timeout']))) { |
|
| 16 | return $this->setError('Unable to connect to FTP server '.$this->options['host']); |
|
| 17 | } |
|
| 18 | if (!ftp_login($this->connect, $this->options['user'], $this->options['pass'])) { |
|
| 19 | $this->umount(); |
|
| 20 | return $this->setError('Unable to login into '.$this->options['host']); |
|
| 21 | } |
|
| 22 | ||
| 23 | // switch off extended passive mode - may be usefull for some servers |
|
| 24 | //@ftp_exec($this->connect, 'epsv4 off' ); |
|