- URL 하드코딩 → .env APP_URL 기반 동적 URL로 변경 - DB 연결 하드코딩 → .env 기반으로 변경 - MySQL strict mode DATE 오류 수정
20 lines
691 B
PHP
20 lines
691 B
PHP
<?php
|
|
// 케이스 전개도 함수
|
|
require_once($_SERVER['DOCUMENT_ROOT'] . "/shutterbox/fun_case.php");
|
|
|
|
// POST로 전달받은 값 (없으면 기본값 설정)
|
|
$seconditem = $_POST['seconditem'] ?? '';
|
|
$check_type = $_POST['check_type'] ?? '';
|
|
$box_width = $_POST['box_width'] ?? '';
|
|
$box_height = $_POST['box_height'] ?? '';
|
|
$front_bottom_width = $_POST['front_bottom_width'] ?? '';
|
|
$rail_width = $_POST['rail_width'] ?? '';
|
|
|
|
$productData = getCasePlate($check_type, $box_width, $box_height, $rail_width, $front_bottom_width);
|
|
|
|
// JSON 형식으로 반환
|
|
header('Content-Type: application/json');
|
|
echo json_encode($productData);
|
|
exit;
|
|
?>
|