bug fix in response to upload server
This commit is contained in:
parent
5fc8fa9d67
commit
748001b9fa
|
@ -185,12 +185,8 @@ final class DatabaseController extends AbstractController
|
||||||
throw new \Exception("خطا در تغییر به مسیر {$remoteDir} در سرور FTP");
|
throw new \Exception("خطا در تغییر به مسیر {$remoteDir} در سرور FTP");
|
||||||
}
|
}
|
||||||
|
|
||||||
// قبل از آپلود فایل
|
|
||||||
echo("در حال آپلود به: $remoteDir / $remotePath");
|
|
||||||
|
|
||||||
// آپلود فایل
|
// آپلود فایل
|
||||||
$result = ftp_put($ftp, basename($remotePath), $filepath, FTP_BINARY);
|
$result = ftp_put($ftp, basename($remotePath), $filepath, FTP_BINARY);
|
||||||
echo("نتیجه آپلود: " . ($result ? 'موفق' : 'ناموفق'));
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$error = error_get_last();
|
$error = error_get_last();
|
||||||
ftp_close($ftp);
|
ftp_close($ftp);
|
||||||
|
|
Loading…
Reference in a new issue