hmm
This commit is contained in:
parent
64cef2fe9e
commit
d610bf7d7a
@ -66,8 +66,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
} else {
|
||||
$uploadDir = $config['upload_path'];
|
||||
if (!is_dir($uploadDir)) {
|
||||
mkdir($uploadDir, 0755, true);
|
||||
mkdir($uploadDir, 0777, true);
|
||||
}
|
||||
chmod($uploadDir, 0777);
|
||||
|
||||
$fileName = $postId . '.' . $fileExt;
|
||||
$filePath = $uploadDir . $fileName;
|
||||
@ -76,7 +77,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$fileSize = $file['size'];
|
||||
$fileType = $fileExt;
|
||||
} else {
|
||||
$error = 'Ошибка загрузки файла: ' . error_get_last()['message'];
|
||||
$error = 'Ошибка загрузки файла';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -74,8 +74,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
} else {
|
||||
$uploadDir = $config['upload_path'];
|
||||
if (!is_dir($uploadDir)) {
|
||||
mkdir($uploadDir, 0755, true);
|
||||
mkdir($uploadDir, 0777, true);
|
||||
}
|
||||
chmod($uploadDir, 0777);
|
||||
|
||||
$fileName = $threadId . '.' . $fileExt;
|
||||
$filePath = $uploadDir . $fileName;
|
||||
@ -84,7 +85,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$fileSize = $file['size'];
|
||||
$fileType = $fileExt;
|
||||
} else {
|
||||
$error = 'Ошибка загрузки файла: ' . error_get_last()['message'];
|
||||
$error = 'Ошибка загрузки файла';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user