Jump to content

execution of unix output redirection command in php run in browser


kiruthika

Recommended Posts

hi all,

 

using few fn like exec and system we can execute unix command inside php program. all those unix commands works fine, if php is executed from the command prompt. but if same program is executed from browser(apache server), esp unix output redirection command is not working.... pl do help

 

thanks in advance

#!/www/php/php

<?php

echo system('whoami');

system('ls > test.txt');

exec('ls > test1.txt');

?>

 

 

the file test1.txt is generated if php program is run in command prompt. but if the same program is run in internet explorer browser, it doesnot generate any files

 

thanks for reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.