0
<html>
<header>
</header>
<body>
<div class='rebol'>
<pre>
Rebol [
    Title: "rebol script embedded in html"
    Author-Url: <a href=http://reboltutorial.com/blog/protect-rebol-script-with-php/>http://reboltutorial.com/blog/protect-rebol-script-with-php/</a>
    Script-Url:  <a href=http://reboltutorial.com/source/rebolscriptembedded.html>http://reboltutorial.com/source/rebolscript.html</a>
    Date:  24-Aug-2009
    Purpose: {
            demo of rebol script embedded in html
    }
]
ask "You're successfull!"
</pre>
</div>
</body>

If tested in Rebol's Console this gives

>> do read clipboard://
You're successfull!
== </body>
>>

Why does it return and how to prevent this if possible ?

4

2 回答 2

3

First: a REBOL script starts with the REBOL [...] header, so everything up to this header will be ignored by the REBOL interpreter. Second: tags are a valid datatype in REBOL. So upon executing your example script, there are three more values following the ask ... expression and the last of those values (</body>) will be returned as the result of your script.

To prevent this, you can add a quit where you want your script to end, i.e. after the ask expression in your example.

于 2009-08-24T11:47:34.037 回答
1

<header> is not a valid HTML tag. You mean <head>

于 2009-08-24T11:37:59.330 回答