php高手过来看看,可以吗?

扎西 扎西
2017-10-06 11:48
234 浏览
4 回复
//单页
public function playjt()
{
$id = $this->security->xss_clean($this->uri->segment(3)); //方式

if(empty($id)){
exit();
}
echo '<?xml version="1.0" encoding="GBK"?><playlist><trackList>';
$sql="SELECT CS_FID,CS_PlayUrl,CS_Name FROM ".CS_SqlPrefix."dance where cs_id='".$id."' and cs_hid=0 and cs_yid=0";
$row=$this->db->query($sql)->row();
if($row){
if(FTP_Fun==1){ //远程附件
$Playurl=FTP_Url.$row->CS_PlayUrl;
}else{
$Playurl=$this->CsdjSkins->playqurl($row->CS_PlayUrl,$row->CS_FID);
}
if(strtolower(substr($Playurl,-3))=='m4a'){
$type='m4a';
}else{
$type='mp3';
}
echo '<track><location>'.$Playurl.'</location><title>'.$row->CS_Name.'</title><creator>QQ-8541652----</creator></track>';
}
echo '</trackList></playlist>';
}

以上3.5代码怎么改成4.1代码?特别感谢!

回复列表(4)

扎西
扎西
2017-10-06 11:49
自己顶一下,php高手们救救我·········
回复
扎西
扎西
2017-10-06 19:01
没人会吗?晕
回复
烟雨江南
烟雨江南
2017-10-08 08:36

//单页
public function playjt($id=0){
$id = (int)$id;
if($id==0) exit();
echo '<?xml version="1.0" encoding="GBK"?><playlist><trackList>';
$row=$this->db->query("SELECT name,fid,purl FROM ".CS_SqlPrefix."dance where id=".$id)->row_array();
if($row){
$purl=$row['purl'];
if($row['fid']>0){
$rowf=$this->db->query("Select purl from ".CS_SqlPrefix."dance_server where id=".$row['fid']."")->row_array();
if($rowf) $purl=$rowf['purl'].$purl;
}
$purl=annexlink($purl);
echo '<track><location>'.$purl.'</location><title>'.$row['name'].'</title><creator>QQ-8541652----</creator></track>';
}
echo '</trackList></playlist>';
}
回复
扎西
扎西
2017-10-08 14:31
还是 老大热情,真的感谢,您用一分钟能决绝,我折腾了两天还是不会,站长功力不行,很恼火啊
回复