本文整理汇总了PHP中Engine::getCmd方法的典型用法代码示例。如果您正苦于以下问题:PHP Engine::getCmd方法的具体用法?PHP Engine::getCmd怎么用?PHP Engine::getCmd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Engine
的用法示例。
在下文中一共展示了Engine::getCmd方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct(&$extr, $params)
{
parent::__construct($extr, $params['name'], Engine::getCmd($params['cmd']) . ' --vanilla --quiet', new Convert('pdf', 'png'), $params['forbidden'], isset($params['category']) ? 'R' : $params['category']);
$pre = $this->dir('@.R');
file_exists($pre) || copy($extr->R_EXT . '@.R', $pre);
$output = shell_exec(Engine::getCmd($params['cmd']) . ' --version');
$pos = strpos($output, "\n");
$this->desc = substr($output, 0, $pos);
$this->lang = 'rsplus';
}
示例2: __construct
function __construct(&$extr, $params)
{
//($name, $cmd, $banfile, $category=null) {
parent::__construct($extr, $params['name'], Engine::getCmd($params['cmd']) . ' -qfH --no-window-system', new Convert('pdf', 'png', '-trim'), $params['forbidden'], isset($params['category']) ? 'M' : $params['category']);
$pre = $this->dir('@.m');
file_exists($pre) || copy($this->extr->R_EXT . '@.m', $pre);
$output = shell_exec(Engine::getCmd($params['cmd']) . ' --version');
$pos = strpos($output, "\n");
$this->desc = substr($output, 0, $pos);
$this->lang = 'matlab';
}
示例3: __construct
function __construct(&$extr, $name, $cmd, $convert, $banfile, $category, $security = null, $sudo = null)
{
$this->extr =& $extr;
$this->name = $name;
system("mkdir -p " . R_DIR . $this->name);
$this->cmd = $cmd;
$this->convert = $convert;
$this->category = $category;
$this->security = is_null($security) ? 1 : $security;
$extr->extension_log($this->extr->R_EXT . $banfile);
if (!file_exists($this->extr->R_EXT . $banfile)) {
throw new Exception("Engine.php: file \"" . $banfile . "\" not found");
}
$this->banned = unserialize(file_get_contents($extr->R_EXT . $banfile));
$this->sudo = is_null($sudo) ? Engine::getCmd('sudo') . ' -u rd ' : $sudo;
$this->lang = 'text';
}