Hi,
In my application i have the facility for the users to upload the file
which has code …
And when i want to view the contents of the file uploaded in my view,in
case if the uploaded file is an html file then i am not able to display
the exact code…Instead the html content in that code gets executed.
if i have uploaded example.html
sampleHello World
I want to display each line of this file in my view.But in my view when
i use
<% myfile= File.open(example.html)%>
-
<% myfile.each do |line| %>
- <%= line %> <% end%>
Can anybody help me on this?