docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 6.1Web Developer ManualProgramming Tags
Copyright © 2019, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com

   

<cache>
<?cdata ?>
<cgi>
<clear-session>
<combine-path>
<crypt>
<debug>
<dice>
<eval>
<force-session-id>
<fsize>
<gauge>
<guess-content-type>
<hash-hmac>
<maketag>
<nocache>
<nooutput>
<noparse>
<?noparse ?>
<page-size>
<?perl ?>
<?pike ?>
<serve-static-resources>
<servlet>
<session>
<set-max-cache>
<trace>
<writefile>
<xml-rpc-call>

<?pike ?>

Provided by module: Scripting: Pike tag

This processing intruction tag allows for evaluating Pike code directly in the document.

Note: With this tag, users are able to run programs with the same right as the server. This is a serious security hasard.

When the pike tag returns, the contents of the output buffer is inserted into the page. It is not reparsed with the RXML parser.

Use entities within the Pike code, scope.variable is handled like &scope.variable; in RXML.

Note: It is still possible to use the <pike>...</pike> container tag, though it behaves exactly as it did in Roxen 2.0 and earlier and the functionality mentioned below does not apply to it. The use of the container tag is deprecated.

Below is a list of special helper functions and constructs which are only available within the <?pike ?> tag.


Attributes

write

write(string fmt, mixed ... args) is a helper function. It formats a string in the same way as printf and appends it to the output buffer. If given only one string argument, it's written directly to the output buffer without being interpreted as a format specifier.


flush

flush() is a helper function. It returns the contents of the output buffer and resets it.


rxml

rxml(string rxmlcode) is a helper function. It parses the string with the RXML parser.


"//O ..." or "/*O ... */"

Pike comment with an 'O' (the letter, not the number) as the very first character treats the rest of the text in the comment as output text that's written directly to the output buffer.


"//X ..." or "/*X ... */"

A Pike comment with an 'X' as the very first character treats the rest of the text in the comment as RXML code that's executed by the RXML parser and then written to the output buffer.


#include "..."

An #include preprocessor directive includes the specified file.


#inherit "..."

An #inherit preprocessor directive puts a corresponding inherit declaration in the class that's generated to contain the Pike code in the tag, i.e. it inherits a specified file from the Roxen filesystem.

<?pike //O <pre> int first = 1; for( var.counter=100; var.counter>1; var.counter--,first=0 ) { if( !first ) { //X &var.counter; bottles of beer on the wall //O } //X &var.counter; bottles of beer on the wall //X &var.counter; bottles of beer //O take one down, pass it around } //O one bottle of beer on the wall //O one bottle of beer //O take it down, pass it around //O no bottles of beer on the wall //O </pre> ?>