Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $dir=$rows['RR_MD5'];
- echo "$dir";
- // connect and login to FTP server
- $ftp_server = "ghjh.jkjnkjn.net";
- $ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
- $login = ftp_login($ftp_conn, 'abcde', 'sfdsgsdfg') or die("You do not have access to this ftp server!");
- $path = '/abcd/xyz/';//('abcd/xyz/.$dir/';)
- $file = basename($_FILES['uploadedfile']['name']);
- $uploadfile = $path .$file;
- $upload = ftp_put($ftp_conn, $uploadfile, $file, FTP_BINARY);
- if (!$upload) { // check upload status
- echo "<h2>FTP upload of $file has failed!</h2> <br />";
- }
- else
- {
- echo "success";
- }
- // close connection
- ftp_close($ftp_conn);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement