exec, system , backtick
| From: | gamin | Date: | Fri, 27 Dec 2002 21:25:44 +0000 |
| Subject: | exec, system , backtick | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-129474@lists.php.net to get a copy of this message | ||
Hello,
Im running PHP 4.0.6 on Red Hat 7.2
I tried a simple command line script, in all cases no_file does not exist. I
do not want the command line script to show the error on the screen but to
deliver it in the variable $r. But alas, in all 3 cases i get 'rm: canoot
remove `no_file': No such file or directory'
#! /usr/bin/php -q
<?
$r =
rm no_file; \\ or $r = system("rm no_file") or exec("rm
no_file");
echo "the value in r is $r";
?>
What should i do ?
thank you
gamin.