Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ruby
- require "cgi"
- require "erb"
- cgi = CGI.new
- fObj = cgi.params["upfile"][0]
- hlfile = File.new("hypergraph.hl", "w")
- hlfile.puts(fObj.read)
- hlfile.close
- @a = %x{hypergraph -ol hypergraph.hl}
- tmpl = File.read("../uploaded.html")
- out = ERB.new(tmpl)
- print "Content-type: text/html\n\n"
- print out.result()
Advertisement
Add Comment
Please, Sign In to add comment