为您找到 "" 的相关结果,共 条。
['name' => '全部音乐', 'color' => '#b89e81', 'text_color' => '#5d4037'], 'cantonese' => ['name' => '粤语歌曲', 'color' => '#c8e6c9', 'text_color' => '#2e7d32'], 'mandarin' => ['name' => '国语歌曲', 'color' => '#fff3e0', 'text_color' => '#e65100'], 'waiyu' => ['name' => '外语歌曲', 'color' => '#e3f2fd', 'text_color' => '#0d47a1'], 'classic' => ['name' => '经典老歌', 'color' => '#efebe9', 'text_color' => '#3e2723'], 'other' => ['name' => '其他音乐', 'color' => '#f3e5f5', 'text_color' => '#6a1b9a'] ]; // 获取音乐列表数据 $musicList = require_once __DIR__ . '/data/music.php'; // 获取并清理搜索词 $searchTerm = isset($_GET['s']) ? trim($_GET['s']) : ''; // 搜索功能:匹配歌名或歌手(不区分大小写) $searchResults = []; if (!empty($searchTerm)) { $lowerTerm = strtolower($searchTerm); foreach ($musicList as $music) { if (strpos(strtolower($music['title']), $lowerTerm) !== false || strpos(strtolower($music['artist']), $lowerTerm) !== false) { $searchResults[] = $music; } } } // 获取当前页面URL function getCurrentPageURL() { $protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; $host = $_SERVER['HTTP_HOST']; $script = $_SERVER['SCRIPT_NAME']; return $protocol . $host . $script; } $currentPageUrl = getCurrentPageURL(); ?>