0

这是我正在尝试的代码:

        $ftp_user_name='user'; 
        $ftp_user_pass='pass'; 
        $ftp_server='ip.addr.ess';
        $ftp_dir='/site.com/public_html/upload/'; //www.site.com/upload/
        $upload_file='some.txt';

        $destination_file=$ftp_dir.$upload_file; 

        $conn_id = ftp_connect($ftp_server); 
        $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); 

        $upload = ftp_put($conn_id, $destination_file, $upload_file, FTP_BINARY); 

没有上传任何内容,但该文件存在于我的服务器上。

我错过了什么?

4

1 回答 1

0

Does your FTP user have write permission on the destination server?

于 2012-05-17T04:08:08.677 回答