1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Files
archived-php-src/ext/ftp/tests/ftp_fput.phpt
T
Max Semenik e9f783fcdd Migrate skip checks to --EXTENSIONS--, p3
For rationale, see #6787

Extensions migrated in part 3:
* ftp
* gmp
* iconv
* opcache
* shmop
2021-04-03 15:23:25 +02:00

23 lines
458 B
PHP

--TEST--
Testing ftp_fput basic functionality
--CREDITS--
Gabriel Caruso (carusogabriel34@gmail.com)
--EXTENSIONS--
ftp
pcntl
--FILE--
<?php
require 'server.inc';
$ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
$ftp or die("Couldn't connect to the server");
$destination_file = basename(__FILE__);
$source_file = fopen(__FILE__, 'r');
var_dump(ftp_fput($ftp, $destination_file, $source_file, FTP_ASCII));
?>
--EXPECT--
bool(true)