1 год назад
История
readme.md
pantagruel74/command-shell
Requirements
- PHP >= 7.4
- php-ext-mbstring
Description
Command shell for executing multi-line sh commands sets. Using tmp files.Install
- composer require “pantagruel74/command-shell”
Using
- Use Pantagruel74\CommandShell\Command object
- Initialize it, with commands string and directory path for tmp files (absolute path). Default creates tmp files in object directory.
- Call executeCommand() method for save all commands execution output into variable.
- Commands should be contained in one string variable, divided “\n” symbol
Example
$command = new Command("echo 111\necho abs", __DIR__);
$result = $command->executeCommand(); //$result contains "111\nabs\n"
License
- MIT
Contacts
- Anatoly Starodubtsev
- Tostar74@mail.ru
Конвейеры
0 успешных
0 с ошибкой