![]() quick server pages |
Basics
Start with a file with HTML in it, located in the ./pages
subdirectory that is created when you
set up your project.
The file can be named anything.. an .html suffix is not required nor recommended.
Also, the file does not need to contain an <html> tag.
Add QUISP directives.
QUISP directives begin with pound sign (#). An example is #if.
A directive occupies one (and only one) line.
The various directives are listed
on the front page
and on the
quick reference syntax summary.
Any line where the first non-whitespace content is // is a comment and is ignored.
QUISP uses
variables.
Variables can be set directly using the #set directive, or they may be set based on incoming CGI
user variables (embedded in the URL or submitted via a form POST) or cookies.
User variable names must begin with an alphabetic character and can contain
alphanumerics and underscores. Variables originating from an sql join result
will contain an embedded period.
Variables are written with a leading
at-sign (@) when the contents are to be displayed or referenced.
Variables are delimited on whitespace and punctuation characters except underscore and period.
Thus, something like @a.@b will not work because the period is taken
to be part of the variable name.
Any line that is not a directive or a comment is output directly, with @variables evaluated.
Thus there is often no need for "print" statements. Also, quoting hassles are minimized.
Simple example 1Here's a simple example... suppose it resides in a file called test1...
Now view your result by going to a URL like this: http://yourdomain.org/cgi-bin/quispcgi?rtn=view1&xval=5
(specifics will of course depend on your home system)
Simple example 2Now let's take the same example and add a fill-in field... when the user clicks on [Go] the page will "call itself", sending the entered value for xval.
|
![]() quick server pages Copyright Steve Grubb |