I need to create a bash file with PHP using the phpseclib library. This is the code I am using now:
$ssh->exec("cat > $sPath$sSavingCode <<EOF
screen -dmS $1 java -Xincgc -Xmx200M -jar craftbukkit-1.4.7.jar nogui
");
The code works, and the file saves, but it skips the "$1". instead, it makes a file with two spaces between -dmS and java.
How can I make it so the $1 is written to the bash file?
Thanks
EDIT
This is the whole function:
{
$sPath = "minecraft/servers/".$user."/";
$sSavingCode = "start.sh";
$ssh->exec("cat > $sPath$sSavingCode <<EOF
screen -dmS $1 java -Xincgc -Xmx200M -jar craftbukkit-1.4.7.jar nogui
");
}
$sPath and $sSavingCode are PHP variables, and the $1 is a bash variable that needs to be in the script.