Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

Ruby Programming
Previous Page Home Next Page

Multipart Form Values

When dealing with a multipart form, the array returned by CGI#[] is composed of objects of class Tempfile, with the following dynamically added methods:
Method Description
read Body
local_path Path to local file containing the content
original_filename Original filename of the content
content_type Content type

class CGI::Session
Parent: Object
Version: 1.6

Index:

new [ ] [ ]= delete update


A CGI::Session maintains a persistent state for web users in a CGI environment. Sessions may be memory-resident or may be stored on disk. See the discussion on page 146 for details.

class methods
new CGI::Session.new( aCgi, [ aHash ]* ) -> aSession

Returns a new session object for the CGI query. Options that may be given in aHash include:

Option Description
session_key Name of CGI key for session identification.
session_id Value of session id.
new_session If true, create a new session id for this session. If false, use an existing session identified by session_id. If omitted, use an existing session if available, otherwise create a new one.
database_manager Class to use to save sessions; may be CGI::Session::FileStore or CGI::Session::MemoryStore (or user defined if you're brave). Default is FileStore.
tmpdir For FileStore, directory for session files.
prefix For FileStore, prefix of session filenames.

instance methods
[ ] aSession[ aKey ] -> aValue

Returns the value for the given key.

[ ]= aSession[ aKey ] = aValue -> aValue

Sets the value for the given key.

delete aSession.delete

Calls the delete method of the underlying database manager. For FileStore, deletes the physical file containing the session. For MemoryStore, removes the session from memory.

update aSession.update

Calls the update method of the underlying database manager. For FileStore, writes the session data out to disk. Has no effect with MemoryStore.


Ruby Programming
Previous Page Home Next Page

 
 
  Published under the terms of the Open Publication License Design by Interspire