Download src/php/php-src/ext/ftp/tests/004.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 611 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ftp/tests/004.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/ftp/tests/004.phpt
-
curl -L -o 004.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ftp/tests/004.phpt
611 Bytes
| --TEST-- | |
| FTP with bogus parameters | |
| --EXTENSIONS-- | |
| ftp | |
| pcntl | |
| --FILE-- | |
| require 'server.inc'; | |
| // Negative timeout | |
| try { | |
| ftp_connect('127.0.0.1', 0, -3); | |
| } catch (ValueError $exception) { | |
| echo $exception->getMessage() . "\n"; | |
| } | |
| $ftp = ftp_connect('127.0.0.1', $port); | |
| if (!$ftp) die("Couldn't connect to the server"); | |
| var_dump(ftp_login($ftp, 'user', 'pass')); | |
| var_dump(ftp_login($ftp, 'user', 'bogus')); | |
| var_dump(ftp_quit($ftp)); | |
| --EXPECTF-- | |
| ftp_connect(): Argument #3 ($timeout) must be greater than 0 | |
| bool(true) | |
| Warning: ftp_login(): Not logged in. in %s on line %d | |
| bool(false) | |
| bool(false) | |