2017 © Pedro Peláez
 

library php-safe-exec

Run system command safely

image

n-coded/php-safe-exec

Run system command safely

  • Monday, September 28, 2015
  • by n-coded
  • Repository
  • 1 Watchers
  • 0 Stars
  • 238 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 4 % Grown

The README.md

PHP-safe-exec

Generate and run shell command safely by escaping option value and argument, (*1)

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:, (*2)

$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, (*3)

The Versions

28/09 2015

dev-master

9999999-dev

Run system command safely

  Sources   Download

by Avatar n-coded

28/09 2015

v0.1.0

0.1.0.0

Run system command safely

  Sources   Download

by Avatar n-coded