xref: /PHP-5.4/ext/ftp/tests/002.phpt (revision bd519ae0)
1--TEST--
2FTP login (SSL)
3--SKIPIF--
4<?php
5$ssl = 1;
6require 'skipif.inc';
7?>
8--FILE--
9<?php
10$ssl = 1;
11require 'server.inc';
12
13$ftp = ftp_ssl_connect('127.0.0.1', $port);
14if (!$ftp) die("Couldn't connect to the server");
15
16var_dump(ftp_login($ftp, 'user', 'pass'));
17var_dump(ftp_raw($ftp, 'HELP'));
18var_dump(ftp_raw($ftp, 'HELP HELP'));
19
20var_dump(ftp_close($ftp));
21?>
22--EXPECT--
23bool(true)
24array(4) {
25  [0]=>
26  string(55) "214-There is help available for the following commands:"
27  [1]=>
28  string(5) " USER"
29  [2]=>
30  string(5) " HELP"
31  [3]=>
32  string(15) "214 end of list"
33}
34array(1) {
35  [0]=>
36  string(39) "214 Syntax: HELP [<SP> <string>] <CRLF>"
37}
38bool(true)
39