Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Funkcje system i uruchomienie procesu
mlody69
post
Post #1





Grupa: Zarejestrowani
Postów: 183
Pomógł: 0
Dołączył: 18.05.2009

Ostrzeżenie: (0%)
-----


Witam
napisałem mały skrypt który ma uruchomić serwer cs,wygląda tak
  1. <?php
  2. echo '<h1>Start serwera</h1>';
  3. system('cd '.$path2.' -u',$return_var);
  4. $cmd ='./hlds_run -game cstrike -master +ip '.$ip.' +port '.$port.' +maxplayers '.$maxplayers.' +exec server.cfg ';
  5. $test = system(EscapeShellCmd($cmd) -u,$return_var);
  6. system('screen -wipe',$return_var);
  7.  
  8. echo $return_var;
  9.  
  10. }
  11. ?>

Jednak na stronie wyświetla się tylko:
Cytat
There is a screen on: 31471.hlds (06/30/09 15:20:51) (Detached) 1 Socket in /var/run/screen/S-www-data. 1

Rozumiem,ze uruchamia go jako www-data a nie root?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 22:44