ftp_alloc_basic2.phpt 442 B

12345678910111213141516171819202122
  1. --TEST--
  2. Testing ftp_alloc returns true
  3. --CREDITS--
  4. Rodrigo Moyle <eu [at] rodrigorm [dot] com [dot] br>
  5. #testfest PHPSP on 2009-06-20
  6. --EXTENSIONS--
  7. ftp
  8. pcntl
  9. --FILE--
  10. <?php
  11. require 'server.inc';
  12. $ftp = ftp_connect('127.0.0.1', $port);
  13. if (!$ftp) die("Couldn't connect to the server");
  14. ftp_login($ftp, 'user', 'pass');
  15. var_dump(ftp_alloc($ftp, 1024, $result));
  16. var_dump($result);
  17. ?>
  18. --EXPECT--
  19. bool(true)
  20. string(20) "1024 bytes allocated"