更新打包機Slot資源

SlotID: ">

PS: 更新一次會強制刷新正在使用的碰友們的網頁🥳

authPassword("catantech","catan9595"); //執行指令 $result .= "
" . $shell->cmdExec(". ~/Desktop/Casino-Core-Type2/gamegitpull.sh " . $SlotID); $result .= "
" . $shell->cmdExec('cd ~/Desktop/Casino-Core-Type2/assets/Game/Game_' . $SlotID . '/;git log -3 --pretty=format:"%h - %an, %s : %ad" --date=format:"%Y-%m-%d %H:%M:%S"'); $print = str_replace("\n", '
', $result); } else if ($_POST["action"] === "顯示Log") { $SlotID = $_POST["SlotID"] ?? ""; if(!$SlotID) { echo "請輸入SlotID"; return; } //將上面的class檔include進來 include_once("ssh2.php"); //初始化class $shell = new ssh2("192.168.5.45"); $shell->authPassword("catantech","catan9595"); //執行指令 $result .= "
" . $shell->cmdExec('cd ~/Desktop/Casino-Core-Type2/assets/Game/Game_' . $SlotID . '/;git log -3 --pretty=format:"%h - %an, %s : %ad" --date=format:"%Y-%m-%d %H:%M:%S"'); $print = str_replace("\n", '
', $result); } //印出指令執行結果 echo $print; ?>