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