note 28961 added to function.system
| From: | radien at zworg dot com | Date: | Wed, 29 Jan 2003 08:48:09 +0000 |
| Subject: | note 28961 added to function.system | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-43036@lists.php.net to get a copy of this message | ||
<?php
$cmd='echo 34';
$val=exec($cmd);
if(empty($val)){
echo "is empty";
}
echo "*the value=".$val."*";
echo $val+1;
?>
I've tried this code named tst2.php one from web and once from command prompt :
#php tst2.php
but the results are deferent.
from the web:
is empty*the value*
and from shell:
the value=35
do you know why?
--
http://www.php.net/manual/en/function.system.php
http://master.php.net/manage/user-notes.php?action=edit+28961
http://master.php.net/manage/user-notes.php?action=delete+28961
http://master.php.net/manage/user-notes.php?action=reject+28961