summaryrefslogtreecommitdiff
path: root/ext/ftp/tests/ftp_fput.phpt
blob: 7d53283e3d949182275a47969b359d7c5b26bed8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Testing ftp_fput basic functionality
--CREDITS--
Gabriel Caruso (carusogabriel34@gmail.com)
--SKIPIF--
<?php require 'skipif.inc'; ?>
--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)