start server in php
#8

Because when you cd, it only changes directory for that call. Your second call for exec() doesn't recognize your use of 'cd' because it goes back to default.

Basically:
PHP код:
exec("cd /directory"); 
// cd is only remembered for the command above. It's forgotten the next time you call exec()
exec("start samp-server.exe"); // It can't find it because it doesn't remember the cd command used 
Try merging the two commands in to one call for exec().
Reply


Messages In This Thread
start server in php - by jamesbond007 - 12.06.2011, 09:26
Re: start server in php - by Iphone1234g - 12.06.2011, 09:32
Re: start server in php - by Ironboy500[TW] - 12.06.2011, 10:14
Re: start server in php - by jamesbond007 - 12.06.2011, 10:21
Re: start server in php - by Ash. - 12.06.2011, 10:22
Re: start server in php - by jamesbond007 - 12.06.2011, 11:12
Re: start server in php - by jamesbond007 - 12.06.2011, 12:52
Re: start server in php - by Calgon - 12.06.2011, 13:07
Re: start server in php - by Cyanide - 12.06.2011, 13:11
Re: start server in php - by Westie - 12.06.2011, 21:21

Forum Jump:


Users browsing this thread: 1 Guest(s)