note 97188 added to function.exec
| From: | michaelhinds at michaelhinds dot com | Date: | Wed, 07 Apr 2010 15:09:40 +0000 |
| Subject: | note 97188 added to function.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-167802@lists.php.net to get a copy of this message | ||
I had trouble when using florin's initialization code:
<?php
// Warning! May not execute!
exec($command, $output = array());
?>
Turning up the error level to E_ALL | E_STRICT showed the message "Only variables should be
passed by reference" so I had to initialize the variable before passing it as follows:
<?php
$output = array();
exec($command, $output);
?>
----
Server IP: 208.69.120.55
Probable Submitter: 194.46.245.182
----
Manual Page -- http://www.php.net/manual/en/function.exec.php
Edit -- https://master.php.net/note/edit/97188
Del: integrated -- https://master.php.net/note/delete/97188/integrated
Del: useless -- https://master.php.net/note/delete/97188/useless
Del: bad code -- https://master.php.net/note/delete/97188/bad+code
Del: spam -- https://master.php.net/note/delete/97188/spam
Del: non-english -- https://master.php.net/note/delete/97188/non-english
Del: in docs -- https://master.php.net/note/delete/97188/in+docs
Del: other reasons-- https://master.php.net/note/delete/97188
Reject -- https://master.php.net/note/reject/97188
Search -- https://master.php.net/manage/user-notes.php