Hi Ruby's,
why calling this script form a borwser (http://myserver/cgi-bin/test.rb)
gives in out punt only the title: "Interbase -- Ruby Application"
#!/usr/local/bin/ruby
require "interbase"
print "Content-type: text/html\n\n"
print "<html><head>"
print "<title> Interbase/Ruby Application</title>"
print "</head><body>"
print "<h1>Interbase -- Ruby Application</h1>"
print "<hr>"
print "Just the First 3 Fields"
print "<br>"
conn = InterBase::connect('/ibase/arianna.gdb', 'sysdba', 'masterkey')
cursor = conn.execute('select * from fornitori')
cursor.each do |record|
print "<br>"
print record[0] , "|", record[1], "|", record[2]
end
cursor.close
print "<hr>"
print "done!"
print "</body></html>"
But, when I execute it locally "./test.rb", I see all the list of values
on the screen.
Thanks.
Jilani