I have shown how you can run command prompt commands from PHP page. shell_exec(‘ ‘) can be used for executing cmd commands from php page.
We can run the same command from PHP page. The code is as below.
<?php
$out=shell_exec('ipconfig/all');
echo '<pre>'.$out.'</pre>';
?>
On running the above code in server, You can see the command prompt command has executed and the output has shown on the web page.
No comments:
Post a Comment