snipt

Ctrl+h for KB shortcuts

Text only

Execute PHP CLI background mode

1
2
3
exec('/usr/bin/php  '.__PATH__.'/CLI/run-background.php '.$var1.' > /dev/null &',$output);
// $output is the variable return for command "exec"
// $var1 send variables in the string path- get array data with vars in run-background.php usign $argv
https://snipt.net/embed/55609c21d588a357b9caf876ccc39a0a/
/raw/55609c21d588a357b9caf876ccc39a0a/
55609c21d588a357b9caf876ccc39a0a
text
Text only
3
2019-08-24T02:36:07
True
False
False
Jan 29, 2013 at 03:12 PM
/api/public/snipt/54745/
execute-php-cli-background-mode
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>exec(&#39;/usr/bin/php &#39;.__PATH__.&#39;/CLI/run-background.php &#39;.$var1.&#39; &gt; /dev/null &amp;&#39;,$output); </span><span id="L-2"><a name="L-2"></a>// $output is the variable return for command &quot;exec&quot; </span><span id="L-3"><a name="L-3"></a>// $var1 send variables in the string path- get array data with vars in run-background.php usign $argv </span></pre></div> </td></tr></table>
"php cli", background, snippet