Salve ragazzi,
ecco la query:
Codice PHP:
<?php
       
   $ftp_server
='SERvER';//serverip
   
$conn_id ftp_connect($ftp_server); 
   
   
   
// login with username and password
   
$user="user";
   
$passwd="passw";
   
$login_result ftp_login($conn_id$user$passwd); 

// check connection
   
if ((!$conn_id) || (!$login_result)) { 
       echo 
"FTP connection has failed!";
       echo 
"Attempted to connect to $ftp_server for user $ftp_user_name"
       die; 
   } else {
       echo 
"
Connected to 
$ftp_server, for user $user
"
;
   }
//directorylike /www.velibaba.com/images
//  ftp_chdir($conn_id, "");


//$destination_file=ftp_pwd($conn_id);

//$destination_file="x.jpg";
echo ("
"
);
//print $destination_file;

echo ("
"
);

// upload the file
$upload ftp_put($conn_id$destination_file$source_fileFTP_BINARY); 

// check upload status
if (!$upload) { 
       echo 
"FTP upload has failed!";
   } else {
       echo 
"Uploaded $source_file to $ftp_server as $destination_file";
   }

// close the FTP stream 
ftp_close($conn_id); 
?>
Come posso fare a mettere il nome di destinzazione uguale a quello che si troa in locale????