<?php
require 'kmd.php';
class kmdphp extends kmd {
var $code = '';
function ret($line) {
$tag_a = false;
$tag_z = false;
$lline = strlen($line);
if (substr($line, 0, 2) == '<?') $tag_a = true;
if (substr($line, $lline - 2) == '?>') $tag_z = true;
if ($tag_z == true) $line = substr($line, 0, $lline - 2);
if ($tag_a == true) {
$this->code = '';
$line = substr($line, 2);
if (substr($line, 0, 3) == 'php') $line = substr($line, 3);
}
$this->code .= $line . "\n";
if ($tag_z == true) {
ob_start();
eval($this->code);
$ret = ob_get_contents();
ob_end_clean();
return "\n<?php\n/*\n" . $ret . "\n*/\n?>\n\n\n";
}
}
}
$kmdphp = new kmdphp('', 'script-only.php', 'script-text.php');
$kmdphp->run();
?>
|