_/___.' >'"". // // | | : `- \`.;`\ _ /`;.`/ - ` : | | // // \ \ `-. \_ __\ /__ _/ .-` / / // // ========`-.____`-.___\_____/___.-`____.-'======== // // `=---=' // // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // 佛祖保佑 永不宕机 永无BUG // //////////////////////////////////////////////////////////////////// session_start(); require_once 'config.php'; if (!isset($conn) || !$conn instanceof mysqli) { die('数据库连接失败,请检查配置文件。'); }?>
发布时间:
'. substr(htmlspecialchars($row['description']), 0, 100) . '...
'; // 获取应用标签 $tagSql = "SELECT t.name FROM tags t JOIN app_tags at ON t.id = at.tag_id WHERE at.app_id = ?"; $tagStmt = $conn->prepare($tagSql); $tagStmt->bind_param('i', $row['id']); $tagStmt->execute(); $tagResult = $tagStmt->get_result(); $tags = []; while ($tag = $tagResult->fetch_assoc()) { $tags[] = htmlspecialchars($tag['name']); } $tagStmt->close(); // 获取应用适用平台 $platforms = json_decode($row['platforms'], true); if (!is_array($platforms)) $platforms = []; echo '标签: '. implode(', ', $tags) . '
'; echo '平台: '. implode(', ', $platforms) . '
'; echo '评分: '. round($row['avg_rating'] ?? 0, 1) . '/5
'; echo '查看详情'; echo '暂无推荐内容
'. substr($row['description'], 0, 100) . '...
'; // 获取应用标签 $tagSql = "SELECT t.name FROM tags t JOIN app_tags at ON t.id = at.tag_id WHERE at.app_id = ?"; $tagStmt = $conn->prepare($tagSql); $tagStmt->bind_param('i', $row['id']); $tagStmt->execute(); $tagResult = $tagStmt->get_result(); $tags = []; while ($tag = $tagResult->fetch_assoc()) { $tags[] = htmlspecialchars($tag['name']); } $tagStmt->close(); // 获取应用适用平台 $platforms = json_decode($row['platforms'], true); if (!is_array($platforms)) $platforms = []; echo '标签: '. implode(', ', $tags) . '
'; echo '平台: '. implode(', ', $platforms) . '
'; echo '评分: '. round($row['avg_rating'], 1) . '/5
'; echo '查看详情'; echo '