Download src/php/php-src/ext/ftp/tests/ftp_fput.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 458 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ftp/tests/ftp_fput.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/ftp/tests/ftp_fput.phpt
-
curl -L -o ftp_fput.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ftp/tests/ftp_fput.phpt
458 Bytes
| --TEST-- | |
| Testing ftp_fput basic functionality | |
| --CREDITS-- | |
| Gabriel Caruso (carusogabriel34@gmail.com) | |
| --EXTENSIONS-- | |
| ftp | |
| pcntl | |
| --FILE-- | |
| 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) | |