#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Pune, Maharashtra, India
    Posts
    86
    Rep Power
    14
    Can any one tell the exact use of the exec function.And Why it is used. Do Any site have a god and straight forward Tutorial for this function.
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    you can run shell commands eg:unix commands etc using exec() - which brings me to a question of my own, somebody once posted unix code for resizing an image - I have searched high and low for it - if anyone an point me in the right direction - it would be much appreciated.

    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Pune, Maharashtra, India
    Posts
    86
    Rep Power
    14
    Can any body make it clear how to use exec function or reccommend any site for it.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    32
    Rep Power
    14
    The function exec() is for you to execute an external program. It lets you run commands that you would normally be able to run on your telnet account say. However it only returns you with the last like of the result.

    <?
    $string = exec("/bin/ls");
    echo $string;
    ?>

    The above example would be the simpliest i could think of =)

    There's other functions like system() which would execute and then displays the output too. Just like the above example.. just swap the exec for system.

    scoobydoo
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Pune, Maharashtra, India
    Posts
    86
    Rep Power
    14
    Is there a nice tutorial about how a exec() and system() functions can be implemented.

Similar Threads

  1. Uploading Files
    By vivekjain in forum ASP Programming
    Replies: 0
    Last Post: February 16th, 2004, 11:21 PM
  2. database access using thread
    By padmini in forum Visual Basic Programming
    Replies: 3
    Last Post: February 6th, 2004, 12:38 AM
  3. Win32::API Help!!!
    By robbydooo in forum Perl Programming
    Replies: 5
    Last Post: February 2nd, 2004, 02:25 PM
  4. Code Benchmarking Tests
    By infamous41md in forum C Programming
    Replies: 4
    Last Post: December 27th, 2003, 04:15 PM
  5. recursive function
    By sheilamurni in forum C Programming
    Replies: 5
    Last Post: December 12th, 2003, 07:42 AM

IMN logo majestic logo threadwatch logo seochat tools logo