xref: /PHP-7.4/ext/ftp/tests/ftp_fput.phpt (revision 5153413e)
1--TEST--
2Testing ftp_fput 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);
12ftp_login($ftp, 'user', 'pass');
13$ftp or die("Couldn't connect to the server");
14
15$destination_file = basename(__FILE__);
16$source_file = fopen(__FILE__, 'r');
17
18var_dump(ftp_fput($ftp, $destination_file, $source_file, FTP_ASCII));
19?>
20--EXPECT--
21bool(true)
22