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