How we can upload a text file or word file using php Code???

Yesterday i was working in which i need some application in which we can upload image file in our system. That is working very well.

But now i want to upload a notepad text file or ms-word file from system to server.
Means I want to upload a text file that can be in .txt, .xls or .doc format. That i want to upload from my system and after uploading that file and i want to show that file on that page from which page i am uploading that file.

All of this i want to do using PHP code . I know just i should use move_upload function for image uploading . But i do not know in correct function of uploading text files how i should use this function.
So Please help me to solve this problem. I will be thankful of that person who will he help me on this topic because i am doing such type of work first time.
So please help me.
Thanks,
Gagan