Sendfile Does Not Send Right File

sendFile does not work in server but works locally in my system… it send the file with the name of the file as its content help me what’s wrong here?

i use this code in controller

	public function actionDownload($id)





help me… ::)

check if $music->path.$music->song is the correct path

Try also


hi guys now I got it we have to use like this

Yii :: app()-> request-> sendFile ( $music -> song , @file_get_contents($music -> path . $music -> song ));

thanks for ur reply just now I got it… by using file_get_contents