운영용 React 라이브러리 교체도 완료되어 콘솔의 경고 메시지도 줄어들었을 것입니다. 다시 한번 테스트 부탁드립니다.
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
require_once("../lib/mydb.php");
|
||||
|
||||
$method = $_SERVER['REQUEST_METHOD'];
|
||||
|
||||
try {
|
||||
if (!file_exists("../lib/mydb.php")) {
|
||||
throw new Exception("Required library file ../lib/mydb.php not found.");
|
||||
}
|
||||
require_once("../lib/mydb.php");
|
||||
|
||||
$pdo = db_connect();
|
||||
|
||||
switch ($method) {
|
||||
@@ -24,7 +28,7 @@ try {
|
||||
echo json_encode(['error' => 'Method not allowed']);
|
||||
break;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
} catch (Throwable $e) {
|
||||
http_response_code(500);
|
||||
echo json_encode([
|
||||
'error' => 'Backend Error',
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
setMembers(data.members || []);
|
||||
} catch (parseError) {
|
||||
console.error("Invalid JSON response:", text);
|
||||
alert("서버로부터 올바르지 않은 응답이 수신되었습니다. DB 연결 또는 테이블 생성 여부를 확인해주세요.");
|
||||
alert("서버로부터 올바르지 않은 응답이 수신되었습니다.\n\n[응답 내용]\n" + text.substring(0, 200) + (text.length > 200 ? '...' : '') + "\n\n요소: DB 연동 또는 테이블(init_db.php) 상태를 확인해주세요.");
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
<?php
|
||||
require_once("../lib/mydb.php");
|
||||
|
||||
try {
|
||||
if (!file_exists("../lib/mydb.php")) {
|
||||
throw new Exception("Required library file ../lib/mydb.php not found.");
|
||||
}
|
||||
require_once("../lib/mydb.php");
|
||||
|
||||
$pdo = db_connect();
|
||||
$sql = file_get_contents("schema.sql");
|
||||
$pdo->exec($sql);
|
||||
echo "Table 'barobill_members' initialized successfully.";
|
||||
} catch (Exception $e) {
|
||||
echo "Error: " . $e->getMessage();
|
||||
} catch (Throwable $e) {
|
||||
echo "Error: [" . get_class($e) . "] " . $e->getMessage();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user