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