002.phpt 736 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --TEST--
  2. FTP login (SSL)
  3. --EXTENSIONS--
  4. ftp
  5. pcntl
  6. openssl
  7. --SKIPIF--
  8. <?php
  9. if (!function_exists("ftp_ssl_connect")) die("skip ftp_ssl is disabled");
  10. ?>
  11. --FILE--
  12. <?php
  13. $ssl = 1;
  14. require 'server.inc';
  15. $ftp = ftp_ssl_connect('127.0.0.1', $port);
  16. if (!$ftp) die("Couldn't connect to the server");
  17. var_dump(ftp_login($ftp, 'user', 'pass'));
  18. var_dump(ftp_raw($ftp, 'HELP'));
  19. var_dump(ftp_raw($ftp, 'HELP HELP'));
  20. var_dump(ftp_close($ftp));
  21. ?>
  22. --EXPECT--
  23. bool(true)
  24. array(4) {
  25. [0]=>
  26. string(55) "214-There is help available for the following commands:"
  27. [1]=>
  28. string(5) " USER"
  29. [2]=>
  30. string(5) " HELP"
  31. [3]=>
  32. string(15) "214 end of list"
  33. }
  34. array(1) {
  35. [0]=>
  36. string(39) "214 Syntax: HELP [<SP> <string>] <CRLF>"
  37. }
  38. bool(true)