$ftp_server = "120.25.1.1";
$ftp_user_name = "p1111";
$ftp_user_pass = "psa12qwe";
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
$file = 'info.php';
$remote_file = '/data/www/psapp/data/info.php';
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if (ftp_put($conn_id, $remote_file, $file, FTP_BINARY)) {
echo "文件移动成功
";
} else {
echo "移动失败
";
}
ftp_close($conn_id);