PHP code example of czproject / runner
1. Go to this page and download the library: Download czproject/runner library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
czproject / runner example snippets
php
use CzProject\Runner\Runner;
$runner = new Runner('/path/to/working/directory');
$result = $runner->run('ls');
$result = $runner->run(array('git', 'remote', 'add', $remoteName, $remoteUrl));
$result = $runner->run(array(
'git',
'clone',
$cloneUrl,
'--bare' => TRUE,
'--branch' => 'master',
));
$result->isOk();
$result->getCommand();
$result->getCode();
$result->getOutput();