Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2014
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. $dir=$rows['RR_MD5'];
  2. echo "$dir";
  3.  
  4. // connect and login to FTP server
  5. $ftp_server = "ghjh.jkjnkjn.net";
  6. $ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
  7. $login = ftp_login($ftp_conn, 'abcde', 'sfdsgsdfg') or die("You do not have access to this ftp server!");
  8.  
  9. $path = '/abcd/xyz/';//('abcd/xyz/.$dir/';)
  10.  
  11. $file = basename($_FILES['uploadedfile']['name']);
  12. $uploadfile = $path .$file;
  13.  
  14. $upload = ftp_put($ftp_conn, $uploadfile, $file, FTP_BINARY);
  15.  
  16. if (!$upload) { // check upload status
  17. echo "<h2>FTP upload of $file has failed!</h2> <br />";
  18. }
  19. else
  20. {
  21. echo "success";
  22. }
  23. // close connection
  24. ftp_close($ftp_conn);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement