注释写代码里了,直接上代码吧
function musicKuwo()
{
$musicName = input('musicName');
if(!$musicName)
return $this->redirect('/#Index/index');
$data = UtilsAll::getMusicInformation($musicName);//这是主要的
/* var_dump($data);
die;*/
/* var_dump(count($data));
die;*/
$DDL = UtilsAll::getMusicInformation($stri = '');//这是获取历史记录要用到的
if (count($DDL))
{ //去除不必要的信息,仅保留下标1,2的歌名和歌曲链接
unset($DDL[0]);
unset($DDL[3]);
unset($DDL[4]);
unset($DDL[5]);
unset($DDL[6]);
unset($DDL[7]);
unset($DDL[8]);
unset($DDL[9]);
}
$DDL = array_values($DDL);//重新对数组排序 数组中排序为:0 歌名 1链接 ..
if (count($data))
{
$data[0] &