Posts: 2,203
Threads: 154
Joined: Oct 2009
Reputation:
0
Im trying to make a server control commands so you can start/stop server from where ever you want but i cant :/
can anyone post how i can start/stop server using php?
my server path is F:\Server\samp-server.exe
Posts: 1,993
Threads: 146
Joined: Sep 2007
Reputation:
0
string exec ( string $command [, array &$output [, int &$return_var ]] )
Edit: for example, exec("C:\sampsvr\samp-server.exe");
Posts: 211
Threads: 5
Joined: Feb 2011
Reputation:
0
dont use exec on windows
evr
learn SSH (linux), it's cheaper and more affective.
Posts: 857
Threads: 9
Joined: Jul 2009
Reputation:
0
I don't use exec() for starting anything.
Ever.
It hangs.
For Linux, I use a combination of proc_open and proc_close, and for Windows I use the WshShell COM object.