file upload

how do i upload a text document in yii,linking ti the database

Do you want to store the text document in the database itself? Or do you want to store it in the file system and then store a reference in the database?