n-coded / php-safe-exec
There is no license information available for the latest version (v0.1.0) of this package.
Run system command safely
v0.1.0
2015-09-28 13:11 UTC
This package is not auto-updated.
Last update: 2026-03-29 02:17:19 UTC
README
Generate and run shell command safely by escaping option value and argument
Usage:
$command = new SafeExec('unoconv');
$command->addOption('-f', 'pdf');
$command->addOption('-o', 'test.pdf');
$command->addArgument('test.docx');
$command->stdoutToNull();
$command->shell_exec();
or use chaining:
$command = (new SafeExec('unoconv'))->addOption('-f', 'pdf')->addOption('-o', 'test.pdf')->addArgument('test.docx')->stderrToStdout();
$command->exec($output, $return_var);
Donation
Thank you for using and donation http://goo.gl/xdEcN6