editmotd.apply.php
来自「这是整套横扫千军3D版游戏的源码」· PHP 代码 · 共 48 行
PHP
48 行
<?php require("inc/head.php") ?>
<?php
function goBackButton()
{
$goback = $_GET['goback'];
if ($goback == "") $goback = "editmotd.php";
echo "<a class='button1' href='$goback'>OK</a>";
}
function forceUpdate()
{
$conn = new ServerConnection();
if (($res = $conn->connect()) !== true)
{
printError("<p style='color: black; font-weight: bold'>" . "Error: " . $res . "</p>");
return;
}
if (($conn->identify()) == false)
{
printError("<p style='color: black; font-weight: bold'>" . "Error while trying to authenticate with the server" . "</p>");
return;
}
if (($res = $conn->sendLine("queryserver UPDATEMOTD motd.txt")) !== TRUE)
{
printError("<p style='color: black; font-weight: bold'>" . "Error while communicating with the server" . "</p>");
return;
}
if (($res = $conn->readLine()) === FALSE)
{
printError("<p style='color: black; font-weight: bold'>" . "Error while communicating with the server" . "</p>");
return;
}
$res = removeBeginning($res, 'SERVERMSG ');
echo "<p><span style='color: blue; font-weight: bold'>TASServer response:</span> $res</p>";
// close connection with server:
$conn->close();
}
forceUpdate();
goBackButton();
?>
<?php require("inc/footer.php") ?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?