Download src/php/php-src/ext/ftp/tests/ftp_fget_basic1.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 752 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ftp/tests/ftp_fget_basic1.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/ftp/tests/ftp_fget_basic1.phpt
-
curl -L -o ftp_fget_basic1.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ftp/tests/ftp_fget_basic1.phpt
752 Bytes
| --TEST-- | |
| Testing ftp_fget ignore autoresume if autoseek is switched off | |
| --CREDITS-- | |
| Rodrigo Moyle <eu [at] rodrigorm [dot] com [dot] br> | |
| #testfest PHPSP on 2009-06-20 | |
| --EXTENSIONS-- | |
| ftp | |
| pcntl | |
| --FILE-- | |
| require 'server.inc'; | |
| $ftp = ftp_connect('127.0.0.1', $port); | |
| ftp_login($ftp, 'user', 'pass'); | |
| if (!$ftp) die("Couldn't connect to the server"); | |
| ftp_set_option($ftp, FTP_AUTOSEEK, false); | |
| $local_file = __DIR__ . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt"; | |
| $handle = fopen($local_file, 'w'); | |
| var_dump(ftp_fget($ftp, $handle, 'fget.txt', FTP_ASCII, FTP_AUTORESUME)); | |
| var_dump(file_get_contents($local_file)); | |
| --CLEAN-- | |
| @unlink(__DIR__ . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt"); | |
| --EXPECT-- | |
| bool(true) | |
| string(12) "ASCIIFooBar | |
| " | |