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