Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    59
    Thanks
    2
    Thanked 0 Times in 0 Posts

    PHP and command promt

    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.

  • #2
    New Coder
    Join Date
    Jul 2005
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, is it possbile look at system and exec commands in php

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

    var_dump($res);

    echo 
    "</pre>"
    If you can not find a decision, maybe you have to try to change a problem

    http://www.gunman.co.nr
    http://bglinux.org

  • #3
    New Coder
    Join Date
    May 2006
    Posts
    59
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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.

  • #4
    New Coder
    Join Date
    Jul 2005
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Most useful source of information would be php.net.
    If you can not find a decision, maybe you have to try to change a problem

    http://www.gunman.co.nr
    http://bglinux.org


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •