You should use `move_uploaded_file` here or even use Yii's bultin class.