PHP start server?
#1

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
Reply
#2

string exec ( string $command [, array &$output [, int &$return_var ]] )

Edit: for example, exec("C:\sampsvr\samp-server.exe");
Reply
#3

Quote:
Originally Posted by Mrkrabz
Посмотреть сообщение
string exec ( string $command [, array &$output [, int &$return_var ]] )

Edit: for example, exec("C:\sampsvr\samp-server.exe");
Dont work i tried it
Reply
#4

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Dont work i tried it
Then you are doing it wrong
Reply
#5

dont use exec on windows
evr

learn SSH (linux), it's cheaper and more affective.
Reply
#6

Quote:
Originally Posted by Abbott
Посмотреть сообщение
dont use exec on windows
evr

learn SSH (linux), it's cheaper and more affective.
The reason why i using exec is cos i using windows and windows dont have ssh or ssh2
Its a nightmare to get it working
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)