note 124878 added to function.exec

From: Date: Fri, 03 Apr 2020 15:48:18 +0000
Subject: note 124878 added to function.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-214411@lists.php.net to get a copy of this message
On Unix, to execute a command $cmd in the background, the one and only allowed standard output redirection syntax is "> /path/to/file &". No other valid standard output redirection syntax will allow a command to be ran in the background. <?php // The following will be ran in the background exec($cmd . " > /path/to/file &"); // All the following will NOT be ran in the background exec($cmd . " >> /path/to/file &"); exec($cmd . " &> /path/to/file &"); exec($cmd . " &>> /path/to/file &"); exec($cmd . " 2>&1 > /path/to/file &"); exec($cmd . " 2>&1 >> /path/to/file &"); ?> ---- Server IP: 45.112.84.4 Probable Submitter: 38.142.137.34 (proxied: 98.113.211.54) ---- Manual Page -- http://php.net/manual/en/function.exec.php Edit -- https://master.php.net/note/edit/124878 Del: integrated -- https://master.php.net/note/delete/124878/integrated Del: useless -- https://master.php.net/note/delete/124878/useless Del: bad code -- https://master.php.net/note/delete/124878/bad+code Del: spam -- https://master.php.net/note/delete/124878/spam Del: non-english -- https://master.php.net/note/delete/124878/non-english Del: in docs -- https://master.php.net/note/delete/124878/in+docs Del: other reasons-- https://master.php.net/note/delete/124878 Reject -- https://master.php.net/note/reject/124878 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#214411) next »