Calling a PHP script from within PHP
<p>I have a PHP script that I'd like to run both via the browser and from the command line. When I run the script from the command line, it executes without a problem. However, when I call it via a function such as <code>exec</code> or <code>passthru</code>, it doesn't work. I'm not getting any output from the call and I see no errors in the logs. I'm very confused...</p>

<pre><code>echo exec('php /usr/share/nginx/www/function.php arg1');
</code></pre>

<p>Any ideas?</p>
