
Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.
Hi all,
I got a serious problem with a file uploading. I really wants me to help anyone to solve this problem soon.
This is my problem. I had to make my code to upload flv files using the ftp_put in ftp file uploading in php. because in my web site all uploaded files are located in another server from the server where the all codes exist.
code in http://drelb4movs.x10hosting.com/
uploaded files in ftp: ikonixprojects.com
Here is my code...
"
$mov_file_base_path = "/drelb_movs/uploaded/";
$ftp_server = "ftp.ikonixprojects.com";
$ftp_user_name = "USERNAME";
$ftp_user_pass ="PASSWORD";
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if ((!$conn_id) || (!$login_result)){
echo "FTP connection has failed!";
echo "Attempted to connect to $ftp_server for user $ftp_user_name";
exit;
}else{
echo "Connected to $ftp_server, for user $ftp_user_name<br />";
}
$destination_file = $ftp_server . $mov_file_base_path . basename($_FILES['movieInput']['name']);
$source_file = "http://drelb4movs.x10hosting.com/home/ruchira".$_FILES['movieInput']['tmp_name'];
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
if (!$upload){
echo "FTP upload has failed!";
}else{
echo "Uploaded $source_file to $ftp_server as $destination_file";
} [/code]
But it all the time giving this warning...
Warning: ftp_put() [function.ftp-put]: Rename/move failure: No such file or directory
I changed my destination file path as well as source file path as necessary but it won't work. Can any one help me to solve this problem.... It will be a great help...
just use curl
take a look at
| Code: |
|
http://php.net/curl |
1 to 4 of 4