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


PHP Host::add_user方法代码示例

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


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

示例1: User

$user = new User();
$host = new Host($user);
$app = new App("upper_case");
$app_version = new App_Version($app);
$project->add_user($user);
$project->add_app($app);
$project->add_app_version($app_version);
$project->start_feeder = true;
$project->start_make_work = true;
$project->start_validate = true;
$project->start_file_delete = true;
$project->start_assimilator = true;
$project->install();
// must install projects before adding to hosts
$host->log_flags = "log_flags.xml";
$host->add_user($user, $project);
$host->install();
echo "adding work\n";
$work = new Work($app);
$work->wu_template = "uc_wu";
$work->result_template = "uc_result";
$work->redundancy = 3;
array_push($work->input_files, "input");
$work->install($project);
$project->start_feeder();
$project->start_make_work($work);
$project->start_validate($app, 3);
$project->start_file_delete();
$project->start_assimilator($app);
$project->start_stripchart();
//$project->start_servers();
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:test_loop.php

示例2:

$project1->shmem_key = "0x12344321";
$project1->short_name = "Project1";
$project1->long_name = "Project1";
$project1->add_user($user);
$project1->install();
// must install projects before adding to hosts
$project1->install_feeder();
$project2->resource_share = 5;
$project2->shmem_key = "0x12345678";
$project2->short_name = "Project2";
$project2->long_name = "Project2";
$project2->add_user($user);
$project2->install();
// must install projects before adding to hosts
$project2->install_feeder();
$host->add_user($user, $project1);
$host->add_user($user, $project2);
$host->install();
$work->install($project1);
$work->install($project2);
$project1->start_servers();
$project2->start_servers();
$host->run("-exit_when_idle -skip_cpu_benchmarks");
$project1->stop(1);
$project2->stop();
$result->server_state = RESULT_SERVER_STATE_OVER;
$project1->check_results(5, $result);
$project1->compare_file("uc_wu_0_0", "uc_correct_output");
$project1->compare_file("uc_wu_1_0", "uc_correct_output");
$project1->compare_file("uc_wu_2_0", "uc_correct_output");
$project1->compare_file("uc_wu_3_0", "uc_correct_output");
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:test_1sec.php


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