I guess, you call actionSaveStudent, or not? At first, I think you should render the page at the end of the execution of your action.
Then, take a look to the following lines:
if(isset($_POST['submit']))
{
$model->name=$_POST['name'];
$model->address=$_POST['address'];
$model->roll=$_POST['roll'];
$rnd = rand(0,9999); // generate random number between 0-9999
//$model->attributes=$_POST['Student'];
$uploadedFile=CUploadedFile::getInstance($model,'photo');
$fileName = "{$rnd}-{$uploadedFile}"; // random number + file name
$model->photo = Yii::app()->basePath.'/../student/'.$fileName;
...
}
You give your $model the name, the address, the roll, etc. through the transmitted $_POST-data but never the file. So, if you call CUploadedFile::getInstance($model,‘photo’), the function finds an empty attribute ‘photo’ in the model.
Take a look to this link to see a possible usage of uploaded files.