webCOMAND

cScript

io_comand_script

The io_comand_script package provides cScript and cTemplate processing functionality.

Example

<?php
require_once('/path/to/comand.php');

$code = '#CALC(1+2)';
$repo = \comand::repo();
$log = new \io_comand_log\log();
$result = \io_comand_script\ctemplate::run_ctemplate($code, [
    'repo' => $repo,
    'log' => $log
]);

// echo the result: 3
echo($result);