PHP 热更新的简单程序

2023-07-07 14:53:10 浏览数 (1)

代码语言:javascript复制
<?php
header("Content-Type:text/html;charset=utf-8");
ini_set ( "display_errors", "on" );

$game_version     = $_REQUEST["game_version"];      //渠道id

echo testLobbyUpdate($game_version);


function testLobbyUpdate($game_version)
{
    $Info = array("type" => 0,"from"=>"test");
    $Info['type'] = 0;
    $Info['list'] =  array(
        //array("version" =>"10.2.18", "url" => "http://localhost:8080/package/Game-10.2.18.zip"),
    );

    if ( $game_version == "10.0.0" )
    {
        $Info['type'] = 4;
        $Info['list'] =  array(
        array("version" =>"10.0.1", "url" => "http://192.168.77.226:8080/package/Game.zip"),
        );
    }

    return  stripslashes(json_encode($Info,JSON_UNESCAPED_UNICODE));
}

?>

0 人点赞