Download src/php/php-src/ext/ftp/tests/bug39583.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 684 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ftp/tests/bug39583.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/ftp/tests/bug39583.phpt
-
curl -L -o bug39583.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ftp/tests/bug39583.phpt
684 Bytes
| --TEST-- | |
| Bug #39583 (FTP always transfers in binary mode) | |
| --EXTENSIONS-- | |
| ftp | |
| pcntl | |
| --FILE-- | |
| $bug39583=1; | |
| require 'server.inc'; | |
| $ftp = ftp_connect('127.0.0.1', $port); | |
| if (!$ftp) die("Couldn't connect to the server"); | |
| var_dump(ftp_login($ftp, 'user', 'pass')); | |
| $source_file = __FILE__; | |
| $destination_file = basename(__FILE__); | |
| // upload the file | |
| $upload = ftp_put($ftp, $destination_file, $source_file, FTP_ASCII); | |
| // check upload status | |
| if (!$upload) { | |
| echo "FTP upload has failed!"; | |
| } else { | |
| echo "Uploaded $source_file as $destination_file"; | |
| } | |
| // close the FTP stream | |
| ftp_close($ftp); | |
| --EXPECTF-- | |
| bool(true) | |
| Uploaded %sbug39583.php as bug39583.php | |