Using SSH on PHP help (SA-MP Commands)
#7

Quote:
Originally Posted by SKAzini
Посмотреть сообщение
PHP код:
echo $ssh->write('nohup ./samp03svr &\n'); 
Try this.

If that doesn't work, please print the folders in your home directory:

PHP код:
echo $ssh->write('dir\n'); 
And in your server folder:

PHP код:
echo $ssh->write('dir samp01\n'); 
Before I do that, I am not sure if I have to use 'write' or 'exec'.
When I use 'write' it like writes '1' as output, but when I used 'exec' it doesn't give any output (as needed I guess).
Anyways, I used:
PHP код:
echo $ssh->exec('cd samp01');
echo 
$ssh->exec('nohup ./samp03svr &');
echo 
$ssh->exec('dir'); 
Output: 'samp01'

--

EDIT: In my server folder:
PHP код:
echo $ssh->exec('dir samp01'); 
Output: LICENSE announce gamemodes npcmodes samp03svr server.cfg README filterscripts include samp-npc scriptfiles server_log.txt
Reply


Messages In This Thread
Using SSH on PHP help (SA-MP Commands) - by ranme15 - 08.08.2014, 14:10
Re: Using SSH on PHP help (SA-MP Commands) - by SKAzini - 08.08.2014, 14:15
Re: Using SSH on PHP help (SA-MP Commands) - by ranme15 - 08.08.2014, 14:17
Re: Using SSH on PHP help (SA-MP Commands) - by SKAzini - 08.08.2014, 14:21
Re: Using SSH on PHP help (SA-MP Commands) - by ranme15 - 08.08.2014, 14:22
Re: Using SSH on PHP help (SA-MP Commands) - by SKAzini - 08.08.2014, 14:25
Re: Using SSH on PHP help (SA-MP Commands) - by ranme15 - 08.08.2014, 14:32
Re: Using SSH on PHP help (SA-MP Commands) - by SKAzini - 08.08.2014, 14:40
Re: Using SSH on PHP help (SA-MP Commands) - by ranme15 - 08.08.2014, 14:44
Re: Using SSH on PHP help (SA-MP Commands) - by SKAzini - 08.08.2014, 14:49

Forum Jump:


Users browsing this thread: 1 Guest(s)