diff options
author | Camil Staps | 2015-07-03 21:42:52 +0200 |
---|---|---|
committer | Camil Staps | 2015-07-03 21:42:52 +0200 |
commit | 85c3e22da596b5f0782adf310cbe32ca076c6c8d (patch) | |
tree | 8e72d6c9949f315014694a5cb6a0834132a3a623 | |
parent | html+php wrapper (diff) |
Check for exec function
-rw-r--r-- | request.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/request.php b/request.php index 2465f5a..594ae4f 100644 --- a/request.php +++ b/request.php @@ -25,6 +25,10 @@ header('Content-type: text/plain'); +if (exec('echo EXEC') != 'EXEC') { + die('exec() is disabled.'); +} + $extended = isset($_GET['extended']) && $_GET['extended'] != 'false'; $expressions = $_GET['expressions']; @@ -41,5 +45,7 @@ $extended = $extended ? '-e' : ''; $call = './LogicParser -b -nt ' . $extended . ' ' . $expressions; -passthru($call); +$out = []; +exec($call, $out); +echo implode("\n", $out); |