在提供的服务更新其服务器后,我正在尝试将文件下载到服务器。登录信息准确。我使用通用代码来执行此操作。例子:
<?php $file = $ROOT.$_GET['file'];
$ftp_server = "127.0.0.1";
$ftp_user_name = "user";
$ftp_user_pass = "pass";
// set up a connection or die
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if (ftp_get($conn_id, $file, $file, FTP_BINARY)) {
echo "Successfully written to $file\n";
} else {
echo "There was a problem\n";
}
?>
我能够联系服务提供商,但现在他们告诉我 ftp_get 已过时或类似的东西。我能做些什么来解决这个问题吗?