Код: Выделить всё
FTP Folder Error:
Windows cannot access this folder. Make sure you typed the file name correctly and you have
permission to access the folder.
Details:
The connection with the server was reset.
Код: Выделить всё
#include
#include
bool createFtpDirectory(const std::string& url, const std::string& userpwd) {
CURL* curl;
CURLcode res;
bool success = false;
curl = curl_easy_init();
if (curl) {
// Set the URL for the FTP operation
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
// Specify the username and password for the FTP server
curl_easy_setopt(curl, CURLOPT_USERPWD, userpwd.c_str());
// Specify the FTP command to create a directory
curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, CURLFTP_CREATE_DIR);
// Perform the request
res = curl_easy_perform(curl);
if (res != CURLE_OK) {
std::cerr
Подробнее здесь: [url]https://stackoverflow.com/questions/78837009/ftp-error-the-connection-with-the-server-was-reset[/url]
Мобильная версия