gagan22 Posted June 9, 2009 Share Posted June 9, 2009 Hi all, I want to upload a notepad text file or ms-word file from my system to a server using php code. 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 Link to comment https://forums.phpfreaks.com/topic/161502-how-we-can-upload-a-text-file-using-php-code/ Share on other sites More sharing options...
Garethp Posted June 9, 2009 Share Posted June 9, 2009 Learn2Google http://www.w3schools.com/PHP/php_file_upload.asp http://www.w3schools.com/PHP/func_directory_dir.asp http://www.w3schools.com/PHP/php_file.asp Read up on it, and come back when you have some real questions Link to comment https://forums.phpfreaks.com/topic/161502-how-we-can-upload-a-text-file-using-php-code/#findComment-852266 Share on other sites More sharing options...
otuatail Posted June 9, 2009 Share Posted June 9, 2009 You can upload a text file the same way as a document. The problem is how does your web page know the name of the document or what tpe it is xls doc or txt. mabe also xlsx and docx also. Desmond. Link to comment https://forums.phpfreaks.com/topic/161502-how-we-can-upload-a-text-file-using-php-code/#findComment-852267 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.