...

View Full Version : PHP and command promt



jhl84
03-27-2007, 07:30 AM
Is it possible to use php to write command lines to the command prompt and read the result from command prompt? example, can I use php to send the command ipconfig to the command prompt and then read all the results from the command prompt? then i'll display the result in a web page.

gunman
03-27-2007, 08:52 AM
Yes, is it possbile look at system and exec commands in php



echo "<pre>";
exec("ipconfig",$res);

var_dump($res);

echo "</pre>";

jhl84
03-28-2007, 10:05 AM
do you know of any reference sites where i can look up on this php and command line? i trying to use php in linux and issue commands to the terminal.

gunman
03-28-2007, 10:09 AM
Most useful source of information would be php.net.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum