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


PHP Main::start方法代码示例

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


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

示例1: _main

 public static function _main()
 {
     self::$printer = new FuturePrinter();
     $main = new Main();
     $main->start();
     echo Thread::code(), " is printing...", PHP_EOL;
     self::$printer->_print("Hello, world (1).");
     self::$printer->_print("Hello, world (2).");
     self::$printer->_print("Hello, world (3).");
 }
开发者ID:nowelium,项目名称:php-thread-utils,代码行数:10,代码来源:Future.class.php

示例2: start

<?php

include_once 'Game.php';
include_once 'Player.php';
include_once 'Dice.php';
class Main
{
    public function start()
    {
        // 1. The game contains
        $playerA = new Player('Player A');
        $playerB = new Player('Player B');
        $playerC = new Player('Player C');
        $playerD = new Player('Player D');
        // 4 players.
        $playerInstances = [$playerA, $playerB, $playerC, $playerD];
        $game = new Game($playerInstances);
        $game->start();
    }
}
$main = new Main();
$main->start();
开发者ID:mario-bros,项目名称:PHPDiceGame,代码行数:22,代码来源:Start.php

示例3: die

<?php

if (version_compare(PHP_VERSION, "5.3.0", "<")) {
    die("require PHP > 5.3.0!");
}
// header('Access-Control-Allow-Origin: *');
// header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
// header('Access-Control-Allow-Methods: GET, POST, PUT');
// header("Content-type:text/plain");
error_reporting(E_ERROR | E_WARNING);
// error_reporting(E_ALL);
session_start();
require "config.php";
require "log.php";
require M_PATH . 'function.php';
if (preg_match("/.*\\/v\\d+\\//", $_SERVER['REQUEST_URI'])) {
    require CUSTOMER . "/engine/commonmodel.php";
    require CUSTOMER . "/engine/dispatch.php";
    $dispatch = new Dispatch();
    echo $dispatch->start();
} else {
    require M_PATH . 'model.php';
    require C_PATH . 'zjhcontroller.php';
    require CONFIG_PATH . "permission.php";
    require M_PATH . "Main.php";
    $main = new Main();
    $result = $main->start();
    echo $result;
}
开发者ID:nongfuguoyuan,项目名称:accountant,代码行数:29,代码来源:index.php


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