exec("CREATE TABLE IF NOT EXISTS accheck ( id INTEGER PRIMARY KEY AUTOINCREMENT, line TEXT NOT NULL, taken_at DATETIME DEFAULT NULL )"); $filepath = __DIR__ . '/AcCheck.txt'; if (!file_exists($filepath)) { die("❌ Không tìm thấy file AcCheck.txt"); } $lines = file($filepath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); $count = 0; foreach ($lines as $line) { $stmt = $db->prepare("INSERT INTO accheck (line) VALUES (:line)"); $stmt->bindValue(':line', trim($line), SQLITE3_TEXT); $stmt->execute(); $count++; } echo "✅ Đã nhập $count dòng vào database."; ?>