ftp_rename_basic1.phpt 483 B

12345678910111213141516171819202122
  1. --TEST--
  2. FTP basic ftp_rename calls
  3. --EXTENSIONS--
  4. ftp
  5. pcntl
  6. --FILE--
  7. <?php
  8. require 'server.inc';
  9. $ftp = ftp_connect('127.0.0.1', $port);
  10. if (!$ftp) die("Couldn't connect to the server");
  11. ftp_login($ftp, 'user', 'pass');
  12. var_dump(ftp_rename($ftp, 'existing_file', 'nonexisting_file'));
  13. var_dump(ftp_rename($ftp, 'nonexisting_file', 'nonexisting_file'));
  14. ?>
  15. --EXPECTF--
  16. bool(true)
  17. Warning: ftp_rename(): No such file or directory in %sftp_rename_basic1.php on line 10
  18. bool(false)