Download src/php/php-src/ext/ftp/tests/ftp_rename_basic1.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 483 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ftp/tests/ftp_rename_basic1.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/ftp/tests/ftp_rename_basic1.phpt
-
curl -L -o ftp_rename_basic1.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ftp/tests/ftp_rename_basic1.phpt
483 Bytes
| --TEST-- | |
| FTP basic ftp_rename calls | |
| --EXTENSIONS-- | |
| ftp | |
| pcntl | |
| --FILE-- | |
| require 'server.inc'; | |
| $ftp = ftp_connect('127.0.0.1', $port); | |
| if (!$ftp) die("Couldn't connect to the server"); | |
| ftp_login($ftp, 'user', 'pass'); | |
| var_dump(ftp_rename($ftp, 'existing_file', 'nonexisting_file')); | |
| var_dump(ftp_rename($ftp, 'nonexisting_file', 'nonexisting_file')); | |
| --EXPECTF-- | |
| bool(true) | |
| Warning: ftp_rename(): No such file or directory in %sftp_rename_basic1.php on line 10 | |
| bool(false) | |