Source for file Include.php
Documentation is available at Include.php
// $Id: Include.php,v 1.3 2004/09/25 19:05:13 pmjones Exp $
* This class implements a Text_Wiki_Parse to include the results of a
* script directly into the source at parse-time; thus, the output of the
* script will be parsed by Text_Wiki. This differs from the 'embed'
* rule, which incorporates the results at render-time, meaning that the
* 'embed' content is not parsed by Text_Wiki.
* This rule is inherently not secure; it allows cross-site scripting to
* occur if the embedded output has <script> or other similar tags. Be
* @author Paul M. Jones <pmjones@ciaweb.net>
'base' => '/path/to/scripts/'
* The regular expression used to find source text matching this
var $regex = '/(\[\[include )(.+?)( .+?)?(\]\])/i';
* Includes the results of the script directly into the source; the output
* will subsequently be parsed by the remaining Text_Wiki rules.
* @param array &$matches The array of matches from parse().
* @return The results of the included script.
// save the file location
$this->file = $this->getConf('base', './') . $matches[2 ];
// extract attribs as variables in the local space
unset ($this->vars['this']);
// done, place the script output directly in the source
Documentation generated on Mon, 11 Mar 2019 14:22:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|