n-coded / php-safe-exec
此包的最新版本(v0.1.0)没有可用的许可证信息。
安全运行系统命令
v0.1.0
2015-09-28 13:11 UTC
This package is not auto-updated.
Last update: 2024-09-28 18:10:41 UTC
README
通过转义选项值和参数安全地生成和运行shell命令
用法
$command = new SafeExec('unoconv');
$command->addOption('-f', 'pdf');
$command->addOption('-o', 'test.pdf');
$command->addArgument('test.docx');
$command->stdoutToNull();
$command->shell_exec();
或使用链式调用
$command = (new SafeExec('unoconv'))->addOption('-f', 'pdf')->addOption('-o', 'test.pdf')->addArgument('test.docx')->stderrToStdout();
$command->exec($output, $return_var);
捐赠
感谢您使用和捐赠 http://goo.gl/xdEcN6