Connecting Tech Pros Worldwide Help | Site Map

How to read a file.

Newbie
 
Join Date: Dec 2007
Posts: 10
#1: Dec 15 '07
hi all,

I will browse the file and read the name of file in my web page.similarly i need to read the contents of that browsed file into my web page.Is it possible to read and write the contents of browsed file into my web page.please if anyone know about it.help me out.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Jul 4 '08

re: How to read a file.


For file upload, see this or this.

If you want to read/write files in Ruby, see this tutorial.
Expert
 
Join Date: May 2007
Posts: 213
#3: Jul 8 '08

re: How to read a file.


What do you have so far? Using the file upload, you will be able to browse to a file, read it's filename, and read it's contents. Then you can output the file contents in your page.
Reply