本文整理匯總了PHP中server::stop方法的典型用法代碼示例。如果您正苦於以下問題:PHP server::stop方法的具體用法?PHP server::stop怎麽用?PHP server::stop使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類server
的用法示例。
在下文中一共展示了server::stop方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: server
}
}
if ($action == 'install' && $id) {
$server = new server($id);
$server->install();
$return = message::success(lang::get('server_install'));
}
if (ajax::is()) {
if ($action == 'start' && $id) {
$server = new server($id);
$server->start();
$return = message::success(lang::get('server_started'));
}
if ($action == 'stop' && $id) {
$server = new server($id);
$server->stop();
$return = message::success(lang::get('server_stopped'));
}
ajax::addReturn($return);
}
$table = new table();
$table->addCollsLayout('25, 32%, *, 70, 170');
$table->addRow()->addCell("\n\t\t\t<input type='checkbox' id='all'>\n\t\t\t<label for='all'></label>\n\t\t", ['class' => 'checkbox'])->addCell(lang::get('name'))->addCell(lang::get('game'))->addCell(lang::get('port'))->addCell(lang::get('status'));
$table->addSection('tbody');
$table->setSql('SELECT * FROM ' . sql::table('server'));
if ($table->numSql()) {
while ($table->isNext()) {
$id = $table->get('id');
$server = new server($id);
$status = $server->status($table->get('status'));
$table->addRow()->addCell("\n\t\t\t\t\t<input type='checkbox' name='ids[]' value='" . $id . "' id='id" . $id . "'>\n\t\t\t\t\t<label for='id" . $id . "'></label>\n\t\t\t\t", ['class' => 'checkbox'])->addCell($table->get('name'))->addCell($table->get('gameID'))->addCell($table->get('port'))->addCell($status, ['class' => 'toggleState']);