Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下面是我的红宝石脚本
require "rubygems" require 'csv' a = Array.new CSV.foreach("p34n234.csv") do |row| a << row end print a
我现在要做的是最后我想生成一个 html 文件并将数组打印到它。
我希望我说得通。
谢谢
PS 我只想在 .html 文件中显示数组。这里没什么特别的:)
我猜你会做这样的事情......
print "HTTP/1.0 200 OK\r\n" print "Content-type: text/html\r\n\r\n" print "<html><body>#{your_array}</body></html>\r\n"