xref: /PHP-7.4/ext/ftp/tests/ftp_site_basic.phpt (revision 91b09c7a)
1--TEST--
2ftp_site function basic functionality
3--CREDITS--
4Gabriel Caruso (carusogabriel34@gmail.com)
5--SKIPIF--
6<?php require 'skipif.inc'; ?>
7--FILE--
8<?php
9require 'server.inc';
10
11$ftp = ftp_connect('127.0.0.1', $port);
12$ftp or die("Couldn't connect to the server");
13
14ftp_login($ftp, 'user', 'pass') or die("Couldn't login into the server");
15
16var_dump(ftp_site($ftp, 'CHMOD 0600 file'));
17var_dump(ftp_site($ftp, 'foo bar baz'));
18?>
19--EXPECTF--
20bool(true)
21
22Warning: ftp_site(): Syntax error, command unrecognized. in %s on line %d
23bool(false)
24