title: file download in yii shows file not exist
body: <p>I am trying to write a script in Yii for downloading files. <br>view file is<br><br><code>echo CHtml::link('Major Oilseeds: World Supply and Distribution.','downloadpdf', array('class'=&gt;'btn btn-darkorange'));</code><br><br> and the controller code is <br><br> <code>$path = Yii::app()-&gt;request-&gt;hostInfo . Yii::app()-&gt;request-&gt;baseURL . '/download/Major_Oilseeds.csv';
   echo $path;
   if(file_exists($path)){
   Yii::app()-&gt;getRequest()-&gt;sendFile( 'Major_Oilseeds.csv' , file_get_contents($path) );
   }
   else{
        echo '&lt;br&gt;File not found';
   }</code> <br> the code <code>echo $path</code> dispalys the location as <br><code>http://localhost/projectv2/download/Major_Oilseeds.csv</code><br> and the download folder contains the file named "Major_Oilseeds.csv" but its always showing "File Not Found" Error. plz somebody help me to solve this. I have also tried the code <br><br> <code>$path = Yii::app()-&gt;request-&gt;hostInfo . Yii::app()-&gt;request-&gt;baseURL . '/download/Major_Oilseeds.csv';
   //  $filename = 'Major_Oilseeds.csv';
   header('Content-Disposition: attachment; charset=UTF-8; filename="'.$path.'"');
   $utf8_content = mb_convert_encoding($content, "SJIS", "UTF-8");
   echo $utf8_content;
   Yii::app()-&gt;end();
   return;</code><br><br> but its also not working :-(</p>