View Single Post
Old 01-20-2003, 01:05 PM   #19 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,529
sde is on a distinguished road
i've tested both of these to make sure that shell_exec() will actually work.

this is putting the command in the arguments
PHP Code:
<?
$output 
shell_exec('touch new_file.txt');
echo 
$output;
?>
and this would do the same thing except putting an executable filename in the arguments
PHP Code:
<?
$output 
shell_exec('script.sh');
echo 
$output;
?>
both of these will create 'new_file.txt' ( assuming script.sh just contains the same command as my first example. )

the problem is when you use any command that generates output. i tested it with 'echo' commands and also 'rm' commands that should not detect a file and give error output.

this bugs the heck out of me.
sde is offline   Reply With Quote