IHYPRESS PROGRAMMING
CGI/Ruby programs with code and output for beginners
classic asp
HOME | ASP | C | CSS | GNUPLOT | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
Ruby (CGI Programming) ❯ Sessions
<15>
#!/usr/bin/ruby require 'cgi' require 'cgi/session' cgi = CGI.new("html5") sess = CGI::Session.new( cgi, "session_key" => "a_test", "prefix" => "rubysess.") lastaccess = sess["lastaccess"].to_s sess["lastaccess"] = Time.now cgi.out{ cgi.html { cgi.body { "Last access time:" + lastaccess.to_s } } }
Hergestellt in Deutschland / Made in Germany
Last access time:
COPYRIGHT © 2015-2024 IHY PRESS Frankfurt am Main 60329 Deutschland