Find the answer to your Linux question:
Results 1 to 2 of 2
I want to do a script to start ts3 using screen in php. The command to start the server is "screen ./ts3server" in directory "/home/ts3". Now I want to know ...
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Location
    Zurrieq, Malta
    Posts
    8

    Start Screen using PHP

    I want to do a script to start ts3 using screen in php. The command to start the server is "screen ./ts3server" in directory "/home/ts3". Now I want to know how I can exec that command using php. Thanks.

  2. #2
    Just Joined!
    Join Date
    May 2009
    Posts
    4
    exec — Execute an external program
    string exec ( string $command [, array &$output [, int &$return_var ]] )

    PHP Code:
    <?php
    // outputs the username that owns the running php/httpd process
    // (on a system with the "whoami" executable in the path)
    echo exec('whoami');
    ?>

Posting Permissions

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