Re: [PHP] exec and system do not work

[email protected] (Daniel Brown)
Newsgroups php.general
Message-ID <CAD9cnePugnx7L+MM8TViDmQgXQvYt-sCEbdMg0UdVEutPOog+w@mail.gmail.com>
On Sun, Aug 25, 2013 at 11:41 PM, Ethan Rosenberg
<[email protected]> wrote:
> Dear List -
>
> I'm lost on this one -
>
> This works -
>
> $out = system("ls -l ",$retvals);
> printf("%s", $out);
>
> This does -
>
> echo exec("ls -l");
>
> This does not -
>
> if( !file_exists("/var/www/orders.txt"));
> {
>    $out = system("touch /var/www/orders.txt", $ret);
>    $out2 = system("chmod 766 /var/www/orders.txt", $ret);
>    echo 'file2<br />';
>    echo file_exists("/var/www/orders.txt");
> }

    <?php echo `whoami`; ?>

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.