[REBOL] Re: Rebol Server Pages
From: al:bri:xtra at: 9-Oct-2002 16:31
Doug wrote:
> Can you provide some examples of how you use it?
At the moment, I'm not using it. :( I just wrote it to show that it's
possible to do what pekr needs without having to do the excess work that
pekr seems to want to do. :)
Here's an example .rsp:
<html>
<head>
<title>{{Test}</title>
</head>
<body>
<%hide [
Data: [
"L1 Foo Stuff" "L1 Bar Stuff"
"L2 Foo Stuff" "L2 Bar Stuff"
]
]%>
<h1>Test</h1>
<% random/seed now either random true [ %>
Have a <b>nice</b> day!
<% ] [ %>
Have a <b>lousy</b> day!
<% ] %><br/>
The date and time now is: <% now %>.<br/>
<table>
<tr><th>Foo</th><th>Bar</th></tr>
<%map Data func [Foo Bar] [reform
[%><tr><td><%Foo%></td><td><%Bar%></td></tr><%]]%>
</table>
</body>
</html>
And here's my test script:
write %Test.html
probe
RSP read %Test.rsp
browse %Test.html
halt
Using it with a web server would be specific to that web server. On Xitami,
I'd put a line at the top of the .rsp file, like this:
#! C:\Rebol\Base\Rebol.exe -cs "RSP Test.rsp"
Andrew Martin
ICQ: 26227169 http://valley.150m.com/