2017-01-14 1 views
0

웹 인터페이스에서 일부 Ts3Musicbots으로 작업하고 있는데 화면 시작 문제가 하나 있습니다.PHP shell_exec with screen 및 Ts3Musicbot

내 코드 : (stackoverflow)

$cmd = "screen -d -m -L $botverzeichnis /mb/$botverzeichnis/start.sh -account $botacc -secretkey $secretKey -port $botport -webif-pw $adminpw -webif-pw-user $userpw -max-disk-space 100 -noquery"; 
$redirect = '2>&1'; 
// using variable substitution only for readability here 
shell_exec("$cmd $redirect", $output); 

그리고 시작 나던. $ cmd를 출력하고 퍼티에 넣으면 작동합니다!) 출력을 반환하고 하나 개의 매개 변수가 shell_exec

답변

0

음, 시작 scrippt 파크

디렉토리는 VAR/www가에서 순간/

이 제발 도와주세요에 있습니다. 그것은해야한다 :

$cmd = "screen -d -m -L $botverzeichnis /mb/$botverzeichnis/start.sh -account $botacc -secretkey $secretKey -port $botport -webif-pw $adminpw -webif-pw-user $userpw -max-disk-space 100 -noquery"; 
$redirect = '2>&1'; 
// using variable substitution only for readability here 
$output = shell_exec("$cmd $redirect"); 

http://php.net/manual/en/function.shell-exec.php

+0

를 참조하고 난 출력을 필요가없는 경우? – Hubsi7

+0

나는 이것을 시도하고 작동하지 않는다. – Hubsi7

+0

출력을 필요로하지 않으면 변수를 변수에 지정할 필요가 없지만 더 자세한 설명이 필요합니다. 당신은 무엇을하고 있고, 어떻게하고 있으며, 어떤 에러 메시지를 얻을 수 있습니까? – barbarity