当前位置: 首页>>代码示例>>PHP>>正文


PHP server::start方法代码示例

本文整理汇总了PHP中server::start方法的典型用法代码示例。如果您正苦于以下问题:PHP server::start方法的具体用法?PHP server::start怎么用?PHP server::start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在server的用法示例。


在下文中一共展示了server::start方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dirname

<?php

include dirname(dirname(dirname(__FILE__))) . '/common/config.php';
include dirname(dirname(dirname(__FILE__))) . '/common/server.php';
include dirname(dirname(dirname(__FILE__))) . '/common/session.php';
include 'apishared.php';
$call = api_checkarg_post('fn');
$db = getsql();
if ($call == 'create') {
    $binary = $db->real_escape_string(api_checkarg_post_required('binary', 'Zandronum version'));
    $hostname = $db->real_escape_string(api_checkarg_post_required('hostname', 'Host name'));
    $iwad = $db->real_escape_string(api_checkarg_post_required('iwad', 'IWAD'));
    $gamemode = $db->real_escape_string(api_checkarg_post_required('gamemode', 'Game mode'));
    $instagib = $db->real_escape_string(api_checkarg_post_required('instagib', 'Instagib') == 'true');
    $buckshot = $db->real_escape_string(api_checkarg_post_required('buckshot', 'Buckshot') == 'true');
    $stdata = $db->real_escape_string(api_checkarg_post_required('stdata', 'Skulltag data') == 'true');
    $skill = intval(api_checkarg_post('skill', 0));
    $dmflags = intval(api_checkarg_post('dmflags', 0));
    $dmflags2 = intval(api_checkarg_post('dmflags2', 0));
    $zadmflags = intval(api_checkarg_post('zadmflags', 0));
    $compatflags = intval(api_checkarg_post('compatflags', 0));
    $zacompatflags = intval(api_checkarg_post('zacompatflags', 0));
    $wads = api_checkarg_post('wads', array());
    $optwads = api_checkarg_post('optwads', array());
    $binary = disciple_json()->main_binary;
    $iwad = data_dir('/iwads/') . $iwad . '.wad';
    $s = new server($binary, $wads, $optwads, $iwad, $hostname, false, $gamemode, '', $skill, $stdata, $instagib, $buckshot, $dmflags, $dmflags2, $zadmflags, $compatflags, $zacompatflags);
    $s->start();
    echo "1 " . $s->id;
}
开发者ID:csnxs,项目名称:disciple,代码行数:30,代码来源:server.php

示例2: server

             server::deleteDir($var);
         }
         echo message::success(lang::get('server_deleted'));
     } else {
         echo message::danger(lang::get('choose_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()) {
开发者ID:kyroskoh,项目名称:rokket,代码行数:31,代码来源:server.php


注:本文中的server::start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。