Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Location
    Norway
    Posts
    391

    PHP: file execution on Windows

    Hi,

    I know theres a command in PHP for *nix boxes.. something like shell_exec(); or exec();.. Is there any similar command for windows boxes? So if I have install.exe in a directory together with a PHP file, could I execute that .exe by running that PHP?
    Any command for that??

  2. #2
    Join Date
    Jun 2002
    Posts
    351
    exec() should work fine on Windows. To run a windows program in the background, use:

    Code:
    exec("start filename.exe");
    This (should) start the program in the background and return to the PHP script straight away.

    Take a look at http://www.php.net/manual/en/function.exec.php for further info.

    Thanks,
    Alan.

Posting Permissions

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