globaltriangles/shell-commander
Composer 安装命令:
composer require globaltriangles/shell-commander
包简介
Extension that allows the execution of shell commands directly to the server supporting general output and errors
README 文档
README
This is a small php composer plugin to execute shell commands with support of regular output and errors during execurtion
Installation
Use the package manager composer to install shell-commander.
composer require globaltriangles/shell-commander
Usage
use ShellCommander\Commander; //the string of the command to execute is this case a simple ls $command = 'ls'; //Call the static method an Execute the command saving the outputs to a variable $exec = Commander::exec($command); if(! empty($exec['output'])) { //Do Something with the output string like so... echo $exec['output']; } if(! empty($exec['error'])) { //Do Something with the error string like so... echo $exec['error']; }
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
统计信息
- 总下载量: 184
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2021-06-24