PHP连接FTP上传文件问题

PHP连接FTP上传文件问题

代码如下:
<?php
$ftp_user_name="*";  
$ftp_user_pass="*";
// set up basic connection
$conn_id = ftp_connect("*.*.*.*","*");
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// check connection
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";
    }
// upload the file
$upload = ftp_put($conn_id, "1.txt","1.txt", FTP_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);
?>

//*************************************************************
有如下问题:
会在服务器上建立1.txt文件,但是1.txt的文件大小会一直是0,也就是根本上就没有传.

另外,服务器上的FTP服务器为server-U

希望有朋友能帮助我

顶上去。。