code = curl_easy_setopt(ftp_handle, CURLOPT_URL, "ftp:127.0.0.1:990/");code = curl_easy_setopt(ftp_handle, CURLOPT_USERNAME, "username");code = curl_easy_setopt(ftp_handle, CURLOPT_PASSWORD, "password");code = curl_easy_setopt(ftp_handle, CURLOPT_DIRLISTONLY, 1L); /*code = curl_easy_setopt(ftp_handle, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_NONE);code = curl_easy_setopt(ftp_handle, CURLOPT_SSL_VERIFYPEER, 1L);code = curl_easy_setopt(ftp_handle, CURLOPT_SSL_VERIFYHOST, 2L);code = curl_easy_setopt(ftp_handle, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_TLS);code = curl_easy_setopt(ftp_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);*/ /*code = curl_easy_setopt(ftp_handle, CURLOPT_TLSAUTH_TYPE, 1L);code = curl_easy_setopt(ftp_handle, CURLOPT_TLSAUTH_USERNAME, "tms");code = curl_easy_setopt(ftp_handle, CURLOPT_TLSAUTH_PASSWORD, "ewstms");*/ /*code = curl_easy_setopt(ftp_handle, CURLOPT_USE_SSL, CURLUSESSL_ALL);*/ code = curl_easy_setopt(ftp_handle, CURLOPT_VERBOSE, 1L);CURLcode res = curl_easy_perform(ftp_handle);
http://cgwxyz.blog.163.com/blog/static/2628060201202953249575 /
http://www.web -development-blog.com/archives/tutorial-ftp-upload-via-curl/
http://bbs.csdn.net/topics/350170833
http:// bbs.csdn.net/topics/350170833
ありがとうございます
しかし、あなたが提供したものはどれも SSL 認証を持っていません
FTP サーバーがログインに SSL 認証を強制する場合、これらは機能しません
次のように置き換えてください:
curl_easy_setopt(ftp_handle, CURLOPT_URL, "ftps://192.168.1.63");