fix: 첨부파일 저장경로 수정
This commit is contained in:
@@ -65,7 +65,7 @@ if ($isEdit) {
|
|||||||
function handle_file_uploads(PDO $pdo, int $postId, array &$errors) {
|
function handle_file_uploads(PDO $pdo, int $postId, array &$errors) {
|
||||||
if (empty($_FILES['attach']['name'][0])) return;
|
if (empty($_FILES['attach']['name'][0])) return;
|
||||||
|
|
||||||
$uploadDir = dirname(__DIR__) . '/uploads/qa';
|
$uploadDir = dirname(__DIR__) . '/uploads/qa/';
|
||||||
if (!is_dir($uploadDir)) {
|
if (!is_dir($uploadDir)) {
|
||||||
if (!mkdir($uploadDir, 0777, true) && !is_dir($uploadDir)) {
|
if (!mkdir($uploadDir, 0777, true) && !is_dir($uploadDir)) {
|
||||||
$errors[] = '업로드 폴더를 생성할 수 없습니다.';
|
$errors[] = '업로드 폴더를 생성할 수 없습니다.';
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ if ($isEdit) {
|
|||||||
function handle_file_uploads(PDO $pdo, int $postId, array &$errors) {
|
function handle_file_uploads(PDO $pdo, int $postId, array &$errors) {
|
||||||
if (empty($_FILES['attach']['name'][0])) return;
|
if (empty($_FILES['attach']['name'][0])) return;
|
||||||
|
|
||||||
$uploadDir = dirname(__DIR__) . '/uploads/qa';
|
$uploadDir = dirname(__DIR__) . '/uploads/qa/';
|
||||||
if (!is_dir($uploadDir)) {
|
if (!is_dir($uploadDir)) {
|
||||||
if (!mkdir($uploadDir, 0777, true) && !is_dir($uploadDir)) {
|
if (!mkdir($uploadDir, 0777, true) && !is_dir($uploadDir)) {
|
||||||
$errors[] = 'Upload folder could not be created.';
|
$errors[] = 'Upload folder could not be created.';
|
||||||
|
|||||||
Reference in New Issue
Block a user