- URL 하드코딩 → .env APP_URL 기반 동적 URL로 변경 - DB 연결 하드코딩 → .env 기반으로 변경 - MySQL strict mode DATE 오류 수정
18 lines
567 B
PHP
18 lines
567 B
PHP
<?php
|
|
// POST로 전달받은 값 (없으면 기본값 설정)
|
|
$model_name = $_POST['model_name'] ?? '';
|
|
$finishing_type = $_POST['finishing_type'] ?? '';
|
|
$bar_height = $_POST['bar_height'] ?? '';
|
|
$bar_width = $_POST['bar_width'] ?? '';
|
|
|
|
// 함수 호출
|
|
require_once($_SERVER['DOCUMENT_ROOT'] . "/bottombar/fun_bottombar.php");
|
|
|
|
$productData = getBottombarData($model_name, $finishing_type, $bar_height, $bar_width);
|
|
|
|
// JSON 형식으로 반환
|
|
header('Content-Type: application/json');
|
|
echo json_encode($productData);
|
|
exit;
|
|
?>
|