bug fix in response to upload server

This commit is contained in:
Hesabix 2025-07-02 16:04:26 +00:00
parent 5fc8fa9d67
commit 748001b9fa

View file

@ -185,12 +185,8 @@ final class DatabaseController extends AbstractController
throw new \Exception("خطا در تغییر به مسیر {$remoteDir} در سرور FTP");
}
// قبل از آپلود فایل
echo("در حال آپلود به: $remoteDir / $remotePath");
// آپلود فایل
$result = ftp_put($ftp, basename($remotePath), $filepath, FTP_BINARY);
echo("نتیجه آپلود: " . ($result ? 'موفق' : 'ناموفق'));
if (!$result) {
$error = error_get_last();
ftp_close($ftp);