首页 相关文章 用PHP写FTP文件上传

用PHP写FTP文件上传

$ftp_server = "*.*.*.*";
$ftp_user = "lu";
$ftp_pass = "love you";

// set up a connection or die
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");

$login_result = ftp_login($conn_id, $ftp_user, $ftp_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";
}

...[ 查看全文 ]

2016-02-19 标签:

用PHP写FTP文件上传的相关文章

手机页面
收藏网站 回到头部