[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Scheming over a PHP replacement
From: |
Bruce Korb |
Subject: |
Scheming over a PHP replacement |
Date: |
Mon, 24 Dec 2001 07:22:52 -0800 |
In the process of trying to accomplish another project, I
have created an extensible HTML format that is remarkably
similar to PHP, except that it uses Guile/Scheme as the
extension language, instead of whatever PHP's language is.
The file is invoked as in:
http://www.someware.com/cgi-bin/autogen?-Tnameoftemplate.tpl
and that "nameoftemplate.tpl" file should contain:
<? autogen5 template ?>
content: text/html
<head> ... head stuff ... </head>
<body> ... body stuff </body>
anywhere within this template, you can insert:
<? (scheme-expressions) ?>
and the results of the evaluation will go into the output.
You can also:
<? while (scheme-expression-yields-true) ?>
....whatever ....
<? endwhile ?>
to repeat blocks over and over. Obviously, there is
much more, too, if you look at:
http://autogen.sourceforge.net
Please note: I fully expect this to work (it works for me :)
but I would be really happy of one or two other people tried
it to see if there are any glaring issues that others would
bump into. Please try this:
http://autogen.sourceforge.net/data/autogen-5.3.0pre.tar.gz
I recommend building with ``--disable-shell'' so that no
shell commands can accidentally "escape" from user input. :-)
(p.s., it will accept input from forms, too, using either
"GET" or "POST" format. The values can be substituted into
the template with:
<? field-name ?>
*OR*:
<? (get "field-name") ?>
Of course, you can use delimiters other than "<?" and "?>",
just change the punctuation surrounding the "autogen5 template"
at the top. Thanks! Regards, Bruce
- Scheming over a PHP replacement,
Bruce Korb <=